Created
April 28, 2010 16:03
-
-
Save nmeans/382318 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if appIsRunning("Pandora") then | |
tell application "Pandora" | |
activate | |
tell application "System Events" to key code 124 | |
end tell | |
else if appIsRunning("iTunes") then | |
tell application "iTunes" to next track | |
end if | |
on appIsRunning(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end appIsRunning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if appIsRunning("Pandora") then | |
tell application "Pandora" | |
activate | |
tell application "System Events" to keystroke " " | |
end tell | |
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