Sunday, March 3, 2019

macos - How can I create a hotkey to play/pause Pandora on OS X?



I'm on OS X and want to have a hotkey (e.g. Cmd-Opt-P) to play/pause Pandora. I've used Butler to set one up for iTunes, but can't find a comparable solution for Pandora. I'm open to any solution (including apps, AppleScripts, etc.) that would allow me to bind a hotkey to play/pause, and I'm willing to use a paid solution as well. What can I do?





Solutions I've looked into and/or tried:




  • Pandora Boy: but the keyboard shortcuts don't seem to work for me, despite following the instructions here.

  • The official Pandora One player: according to the comments on this Pandora blog post, it doesn't support hotkeys.




My system:





  • OS X 10.6.6

  • Each of the various truly-modern browsers

  • Flash 10.1


Answer



Open Automator, select the "Service" template. Configure (at the top) the service to receive no input in any application. On the left in Library » Utilities, double-click the Run AppleScript action to add it to the service. Paste the following code:



tell application "PandoraBoy" to playpause



Press Cmd-S to save and name it "Play/Pause Pandora".






Open System Preferences » Keyboard » Keyboard Shortcuts » Services, select "Play/Pause Pandora" from the list and click to its right so an input field appears. Press your desired shortcut.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...