Created
November 16, 2014 15:40
-
-
Save bmatheny/4d9b5fab37ba588af312 to your computer and use it in GitHub Desktop.
usb overdrive spotify config
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
-- previous track | |
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
if is_running("Spotify") then | |
tell application "Spotify" | |
previous track | |
end tell | |
else if is_running("iTunes") then | |
tell application "iTunes" | |
previous track | |
end tell | |
end if | |
-- next track | |
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
if is_running("Spotify") then | |
tell application "Spotify" | |
next track | |
end tell | |
else if is_running("iTunes") then | |
tell application "iTunes" | |
next track | |
end tell | |
end if | |
-- play/pause | |
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
if is_running("Spotify") then | |
tell application "Spotify" | |
playpause | |
end tell | |
else if is_running("iTunes") then | |
tell application "iTunes" | |
playpause | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment