Skip to content

Instantly share code, notes, and snippets.

@benjamincharity
Created August 29, 2012 00:20
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 benjamincharity/3505578 to your computer and use it in GitHub Desktop.
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 )
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