Created
August 29, 2012 00:20
-
-
Save benjamincharity/3505578 to your computer and use it in GitHub Desktop.
This applescript adds keyboard controls for Spotify via Alfred. via( http://tumblr.mobocracy.net/post/8473375264/alfred-meet-spotify )
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
on alfred_script(q) | |
tell application "System Events" | |
set MyList to (name of every process) | |
end tell | |
if (MyList contains "Spotify") is true then | |
if (q equals "p") then | |
tell application "Spotify" to play | |
else if (q equals "pp") then | |
tell application "Spotify" to pause | |
else if (q equals "t") then | |
tell application "Spotify" to playpause | |
else if (q equals "n") then | |
tell application "Spotify" to next track | |
else if (q equals "pr") then | |
tell application "Spotify" to previous track | |
end | |
end if | |
end alfred_script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment