How to use Breakaway + scripts to pause/play at jack unplug/plug in?

Hi everyone,

I am new to AppleScript, but I would like to use the Breakaway app ( to pause not only iTunes, but also Spotify and VLC player when I unplug my jack or press mute.

At first I thought I managed to do this by just creating a disconnect and connect trigger (breakaway > preferences > plugins) corresponding to two simple applescripts: “tell application “Spotify” to pause” and “tell application “Spotify” to play”, respectively.

This seemed to work well, until I plugged in my jack when I wasn’t using Spotify and VLC and they both launched and started playing!:confused:

So, what I want to achieve is the following:

  • when I am using Spotify/ VLC it has to pause whenever I unplug my jack or press mute and it has to resume when I plug back in again or unmute.
  • When I am not using Spotify/ VLC and I plug in or unplug my jack, it should not launch (and start playing, in the case of plug in).

Anyone knows how to do this? All help is appreciated!:slight_smile: