Last active
May 3, 2020 12:45
-
-
Save andrew-qa/5a872eaa52a04f5ceb14cabcf653453d to your computer and use it in GitHub Desktop.
Script to control Apple Music
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
(* | |
Script to control Music app | |
I use it for custom button on TouchBar using BetterTouch Tool | |
*) | |
if application "Music" is running then | |
tell application "Music" | |
if player state is stopped then | |
reopen | |
activate | |
else | |
playpause | |
end if | |
end tell | |
else | |
tell application "Music" to activate | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment