Created
March 16, 2012 07:26
-
-
Save jakemauer/2049001 to your computer and use it in GitHub Desktop.
Keyboard music playback key Applescripts
This file contains hidden or 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("spotify") then | |
| tell application "Spotify" | |
| playpause | |
| end tell | |
| else if appIsRunning("iTunes") then | |
| tell application "iTunes" | |
| playpause | |
| end tell | |
| end if | |
| on appIsRunning(appName) | |
| tell application "System Events" to (name of processes) contains appName | |
| end appIsRunning | |
| if appIsRunning("spotify") then | |
| tell application "Spotify" | |
| previous track | |
| end tell | |
| else if appIsRunning("iTunes") then | |
| tell application "iTunes" | |
| previous track | |
| end tell | |
| end if | |
| on appIsRunning(appName) | |
| tell application "System Events" to (name of processes) contains appName | |
| end appIsRunning | |
| if appIsRunning("spotify") then | |
| tell application "Spotify" | |
| next track | |
| end tell | |
| else if appIsRunning("iTunes") then | |
| tell application "iTunes" | |
| next track | |
| end tell | |
| end if | |
| on appIsRunning(appName) | |
| tell application "System Events" to (name of processes) contains appName | |
| end appIsRunning | |
| tell application "iTunes" | |
| if player state is paused then play | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment