BlueSense AppleScripts
How to pause Spotify player for Mac in AppleScript
Change the status of Skype to AWAY (if ONLINE and running).
script SpotifyPlayPause
try
tell application "System Events"
activate
set runningApp to processes whose bundle identifier is "com.spotify.client"
end tell
if runningApp is not {} then
tell application "Spotify" to pause
end if
on error errString number errorNumber
log (errString)
end try
end script