Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Vegerot

macrumors member
Original poster
May 14, 2009
68
2
Baltimore, Maryland
So I recently wrote an AppleScript to control Spotify (tell application "Spotify" to playpause) with my Apple EarPods. But unfortunately, that will only make Spotify playpause. I was wondering if there was a way to modify my script so that my active/most recent media player will playpause (like "tell system to playpause"); similar to how on iOS clicking the EarPods will control my most recent media app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.