Last active
July 4, 2019 01:39
-
-
Save fever324/04c65d96236a118e41b0f6eb8195f506 to your computer and use it in GitHub Desktop.
AppleScript for play pausing for alfred workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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