Pandora Desktop Hotkeys Enhanced
I noted an issue with my original Pandora Desktop Hotkey script in that the embedded Flash control in the Pandora Desktop app sometimes has a different "control" name. This change in name would _sometimes_ make the script unable to send keys to the control. Here's an updated script that tries to work around this issue by simply sending keys to either of the possible names for that embedded control. Enjoy!
DetectHiddenWindows, On
; Pandora Controls
;Ctrl-Win-Alt-Right Arrow
^#!Right::
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {RIGHT} ; Next
ControlSend, WebPluginView2, {RIGHT} ; Next
return
;Ctrl-Win-Alt-Up Arrow
^#!Up::
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {UP} ; Volume Up
ControlSend, WebPluginView2, {UP} ; Volume Up
return
;Ctrl-Win-Alt-Shift-Up Arrow
^#!+Up::
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {SHIFT}{UP} ; Volume Max
ControlSend, WebPluginView2, {SHIFT}{UP} ; Volume Max
return
;Ctrl-Win-Alt-Down Arrow
^#!Down::
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {DOWN} ; Volume Down
ControlSend, WebPluginView2, {DOWN} ; Volume Down
return
;Ctrl-Win-Alt-Shift-Down Arrow
^#!+Down::
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {SHIFT}{DOWN} ; Mute
ControlSend, WebPluginView2, {SHIFT}{DOWN} ; Mute
return
;Ctrl-Win-Alt-Space
^#!Space::
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {SPACE} ; Pause/Play
ControlSend, WebPluginView2, {SPACE} ; Pause/Play
return
;Ctrl-Win-Alt-Plus
^#!+::
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, + ; Thumbs Up
ControlSend, WebPluginView2, + ; Thumbs Up
return
;Ctrl-Win-Alt-Minus
^#!-::
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, - ; Thumbs Down
ControlSend, WebPluginView2, - ; Thumbs Down
return
Comments
#SingleInstance, Force
DetectHiddenWindows, On
to the beginning of the script so you don't actually have to have the Pandora window showing when using the controls.
I'd just like to add that for those with "media" keys you can the built in key definitions.
Media_Play_Pause::
Media_Next::
Volume_Mute::
Volume_Down::
Volume_Up::
I also added support for a Media Keyboard,removed mute and replaced with pause, made the Media Keyboard stop button pause because there is no stop in Pandora.
SetTitleMatchMode, Fast
DetectHiddenWindows, On
#WinActivateForce
; Pandora Controls with Media Keyboard Controls
;Ctrl-Alt-Right Arrow
^!Right::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {right} ; Next
return
;Media Keyboard Next
Media_Next::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {right} ; Next
return
;Ctrl-Alt-Up Arrow
^!Up::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {up} ; Volume Up
return
;Media Keyboard Volume Up
Volume_up::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {up} ; Volume Up
return
;Ctrl-Alt-Shift-Up Arrow
^!+Up::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {SHIFT}{up} ; Volume Max
return
;Ctrl-Alt-Down Arrow
^!Down::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {down} ; Volume Down
return
;Media Keyboard Volume Down
Volume_down::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {down} ; Volume Down
return
;Ctrl-Alt-Shift-Down Arrow
^!+Down::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {SHIFT}{space} ; Pause/Play
return
;Media Keyboard Play/Pause
Media_Play_Pause::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {SHIFT}{space} ; Pause/Play
return
;Media Keyboard Stop (incase you are used to stopping music but theres no "Stop" on Pandora, so we'll pause)
Media_Stop::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {SHIFT}{space} ; Pause/Play
return
;Ctrl-Alt-Plus
^!+::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, + ; Thumbs Up
return
;Ctrl-Alt-Minus
^!-::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, - ; Thumbs Down
return
SetTitleMatchMode, Fast
DetectHiddenWindows, On
#WinActivateForce
; Pandora Controls with Media Keyboard Controls
;Ctrl-Alt-Right Arrow
^!Right::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {right} ; Next
return
;Media Keyboard Next
^Media_Next::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {right} ; Next
else Send, {Media_Next}
return
;Ctrl-Alt-Up Arrow
^!Up::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {up} ; Volume Up
return
;Media Keyboard Volume Up
^Volume_up::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {up} ; Volume Up
return
;Ctrl-Alt-Shift-Up Arrow
^!+Up::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {SHIFT}{up} ; Volume Max
return
;Ctrl-Alt-Down Arrow
^!Down::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {down} ; Volume Down
return
;Media Keyboard Volume Down
^Volume_down::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {down} ; Volume Down
return
;Ctrl-Alt-Shift-Down Arrow
^!+Down::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {SHIFT}{space} ; Pause/Play
return
;Media Keyboard Play/Pause
^Media_Play_Pause::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {SHIFT}{space} ; Pause/Play
return
;Media Keyboard Stop
^Media_Stop::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, {SHIFT}{space} ; Pause/Play
return
;Ctrl-Alt-Plus
^!+::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, + ; Thumbs Up
return
;Ctrl-Alt-Minus
^!-::
if WinExist("ahk_class ApolloRuntimeContentWindow") or WinExist("ahk_class" . ApolloRuntimeContentWindow)
ControlSend, ahk_parent, - ; Thumbs Down
return
Run the script inside of the script manager.
Just upgraded to Pandora One after a week, partially to get the desktop player. Now I can use my media keys just like I was using iTunes (used Edlebrock's version)...so cool!
"DetectHiddenWindows, On"
to the script so it can find Pandora if it is minimized to the system tray. Many thanks to everyone.
Pandora One Desktop Auto Hot Key Script
Thank you to both of you guys for getting me to the desired result :) :)
Thank you to both of you guys for getting me to the desired result :) :)
I'm on a 64bit OS, not sure if Adobe has different frameworks for 32/64.
Thank you to both of you guys for getting me to the desired result :) :)