Skip to content

Instantly share code, notes, and snippets.

@fever324
Last active July 4, 2019 01:39
Show Gist options
  • Save fever324/04c65d96236a118e41b0f6eb8195f506 to your computer and use it in GitHub Desktop.
Save fever324/04c65d96236a118e41b0f6eb8195f506 to your computer and use it in GitHub Desktop.
AppleScript for play pausing for alfred workflow
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
if is_running("Spotify") then
tell application "Spotify"to playpause
else if is_running("iTunes") then
tell application "iTunes" to playpause
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment