Official Pandora Desktop and Hotkey Support?

EDIT: There is a slight problem occasionally with this script not being able to send keys to the Pandora Desktop Air app. I've got an updated version of the script that you can use instead of this one.

Pandora is a different sort of online music service that uses the work of the Music Genome Project to automatically selects music similar to an artist or particular song, and then streams it over the Internet for your listening pleasure. You can't select individual songs, but you can skip ones you don't like and make as many music channels as you like to suit your particular tastes.

Pandora provides a free version of the product that is supported by visual advertising, and a very inexpensive ($36 USD per year as of the creation of this entry) subscription supported version of the product that provides higher quality streams and no advertising.

Traditionally, Pandora has been a Flash-based application that required you to have your bulky browser open to listen on the desktop. There are a number of third party apps like OpenPandora, or PandoraBoy that were spawned to fill the demand of running Pandora outside the browser. It's likely that the proliferation of these apps, which often also allow you to hide the visual advertising in the free product version, which has required Pandora to recently begin adding audio ads in-stream with the music. Personally, I think Pandora has a right to make some money of their ideas, so I'm quite fine with that very minor inconvenience of an ad in my free music here and there.

Pandora released a Beta version of an Adobe Air application back in July of 2008 that allows folks to run Pandora as a desktop app that is mostly unencumbered from having to run in a full browser window. This small app seems to take less resources to run, and seems like it might actually be supported by the Pandora folks. The app is still in beta, and is still missing some features.

One of the most hotly requested features is the ability to control Pandora with Hot keys. Until the Pandora folks can afford to add this feature to the desktop app, there is a way you can get hot key support on Windows.

There is a little app you can download called AutoHotKey. This app allows you to actually automate most applications with a variety of inputs. After installing, just start AutoHotKey up, right click on the tray icon for it and select "Edit This Script". Then paste the script below into the editor, and save it. Finally right click on the AutoHotKey icon again and select "Reload this script". You can add a copy of the AutoHotKey shortcut to the Windows Startup group to make sure it is always running, or perhaps wrap the launch for Pandora Desktop with a call to AutoHotKey first.

Below is a script that allows you to use Ctrl-Win-Alt in front most of the standard Pandora hotkeys. This means you can skip songs by hitting Ctrl-Win-Alt-Right Arrow, etc. If you don't like that key combination, you can look at the "Hotkeys" section of the AutoHotKey help to see your options (joysticks, mice, media keys are all supported).

(Edited from original Feb 02 posting. The embedded control sometimes shows up as WebPluginView1 and sometimes WebPluginView2. The script now sends to both controls.)

; Pandora Controls
; Ctrl-Win-Alt-Right Arrow, Skip song
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {RIGHT} ; Next
ControlSend, WebPluginView2, {RIGHT} ; Next

; Ctrl-Win-Alt-Up Arrow, Volume Up
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {UP} ; VolUp
ControlSend, WebPluginView2, {UP} ; VolUp

; Ctrl-Win-Alt-Down Arrow, Volume Down
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {DOWN} ; VolDown
ControlSend, WebPluginView2, {DOWN} ; VolDown

; Ctrl-Win-Alt-Space, Pause/Resume Playing
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, {SPACE} ; PlayToggle
ControlSend, WebPluginView2, {SPACE} ; PlayToggle

; Ctrl-Win-Alt-Plus, Thumbs up a song
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, + ; ThumbsUp
ControlSend, WebPluginView2, + ; ThumbsUp

; Ctrl-Win-Alt-Shift-Minus, Thumbs down a song
IfWinExist, ahk_class ApolloRuntimeContentWindow
ControlSend, WebPluginView1, - ; ThumbsDown
ControlSend, WebPluginView2, - ; ThumbsDown


Daniel Larsen said…
you rock. I was just going to do this same thing when I happened across your post. Thanks!
Phillip Foose said…
This comment has been removed by the author.
Phillip Foose said…
Hey I updated your script to work with the latest version of Pandora|One (2.0.0), you can get it here

Thanks for the good work!
Unknown said…
hi can you help me figure out why the script does not enable my keyboard built in media keys to work with the pandora desktop ap? The control + keys work just fine, just not the media keys on my keyboard. Any suggestions?

Popular posts from this blog

Ghetto Cloud Foundry Home Lab

Using Snapshot Isolation with SQL Server and Hibernate

Fedora, Ant, and Optional Tasks