On my iPod I have activator to automatically open Spotify when I plug in my headphones and I would like to know if I can do a similar thing on OS X.
What I would like is to automatically play Spotify if the application is already open, otherwise, I would like Spotify to open automatically then play the music. I would also like it to stop the music when my headphones are unplugged.
Does anyone know if there is a Application that allows this to happen?
Best Answer
Breakaway is no longer maintained on its website, but it can still be downloaded from Sourceforge. I've associated it with the following two AppleScripts to mute the speaker and pause Spotify when the jack is disconnected, and to play Spotify when the jack is connected. Follow the instructions on makeuseof to see how to author AppleScript and connect it to Breakaway.
jack-disconnected.scpt
jack-connected.scpt