Skip to content

Instantly share code, notes, and snippets.

@matasar
Last active December 15, 2015 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matasar/5288487 to your computer and use it in GitHub Desktop.
Save matasar/5288487 to your computer and use it in GitHub Desktop.
An applescript that works for both Rdio and iTunes, and does play/pause. I use this with Launchbar to remote control things. You can also replace "playpause" with "previous track" and "next track" for that behavior.
if appIsRunning("Rdio") then
tell application "Rdio" to playpause
else if appIsRunning("iTunes") then
tell application "iTunes" to playpause
end if
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment