1

I have a web player application, and i would like to put it on mute or unmute with a shortcut key.

I want to do this while the chrome window is minimized, for example if i have to answer a call on skype, instead of maximizing the window and pressing the mute button, i would just press a hotkey and the minimized chrome window with my web player application and it would be put to mute.

I can easily create a javascript event for the said combination to put the player on mute, i just need a solution to mute it while the chrome window of the player is minimized and out of focus.

I have tried the "Shortcut Manager 0.7.9" extension for chrome but it does what i can already do in javascript, it doesn't work if the window is minimized.

I can accept 3rd party software, maybe a c++ software that sends my hotkey to the said chrome browser, maybe an auto hot key (.ahk) script? Or maybe a chrome extension that would work while the window is minimized.

Thanks.

Highstrike
  • 462
  • 3
  • 14

1 Answers1

3

Since you seem to know the technical details involved I'll just summarize you how I did this for Pandora with Chrome on Windows.

I wrote an auto hotkey script (ahk) that listens for hotkey combos and executes a php script which in turn modifies a database value (or could write to a file). I then wrote a grease monkey script that runs on the webpage to continuously perform jsonp requests to localhost which echoes the value in the database. The script reacts accordingly and the whole system works flawlessly, albeit may be taxing some system resources. You could also use node js instead of php.

Blake Regalia
  • 2,677
  • 2
  • 20
  • 29
  • turns out i just need a .ahk script that can send my alt+backspace hotkey to a minimized chrome window. – Highstrike Sep 09 '12 at 12:55
  • see this http://stackoverflow.com/questions/12339949/send-hotkey-to-minimized-chrome-window/12340358#12340358 – Highstrike Sep 09 '12 at 15:26
  • That's cool and is just what you need I guess. My approach allows me to skip songs, pause and thumbs up tracks (a sort of web app remote control if you will) – Blake Regalia Sep 09 '12 at 17:22
  • I think instead of writing to a database or file and then having a script poll that, you could call into a script written in a language like Ruby that can interface with a web browser testing framework like Selenium or Watir; then the script could interact with the web interface. – echristopherson Sep 09 '12 at 18:48
  • I like this, but it seems a little much. Is there not a simpler way? – jdotjdot Jan 09 '13 at 16:30
  • is this really possible to do this when browser is minimized? Please let me know if your solution worked. – maximus ツ Apr 06 '13 at 14:07
  • @maximus see answer linked in second comment. – Marcel May 11 '13 at 13:17