Skip to content

Instantly share code, notes, and snippets.

@jameslittle230
Created November 29, 2017 19:49
Show Gist options
  • Save jameslittle230/fe3bb5b3f2024dadd3b921f1ec8d4138 to your computer and use it in GitHub Desktop.
Save jameslittle230/fe3bb5b3f2024dadd3b921f1ec8d4138 to your computer and use it in GitHub Desktop.
set output to "paused"
if application "Spotify" is running then
tell application "Spotify" to set spotifyState to (player state as text)
if spotifyState is "playing" then
set output to "playing"
end if
end if
if application "iTunes" is running then
tell application "iTunes" to set itunesState to (player state as text)
if itunesState is "playing" then
set output to "playing"
end if
end if
return output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment