Pause Spotify With Keyboard Maestro

Pause Spotify With Keyboard Maestro

I’ve been playing with Spotify lately. After two weeks, I still prefer Rdio, but that’s a topic for another post. This post concerns using AppleScript and Keyboard Maestro to toggle between pause and play in Spotify.

This may be overly complicated, but it works for me. Via Google, I found christineyen’s Github here:

tell application "System Events"
    set MyList to (name of every process)
end tell
if (MyList contains "Spotify") is true then
    tell application "Spotify" to playpause
end if

This can easily be assigned to a key sequence using either FastScripts or Keyboard Maestro. I chose Keyboard Maestro because that’s what was in my head at the time. Here’s the configuration:

Keyboard Maestro - Spotify - Pause/Play

This assigns option-P (⌥-P) to pause Spotify if it’s playing or play Spotify if it’s paused. I’ve been using it for a week now, and it’s working great.

There may be easier ways to accomplish this, but this solution works for me, and that’s good enough.

    Related Posts