Skip to content

Instantly share code, notes, and snippets.

@andrew-qa
Last active May 3, 2020 12:45
Show Gist options
  • Save andrew-qa/5a872eaa52a04f5ceb14cabcf653453d to your computer and use it in GitHub Desktop.
Save andrew-qa/5a872eaa52a04f5ceb14cabcf653453d to your computer and use it in GitHub Desktop.
Script to control Apple Music
(*
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