Skip to content

Instantly share code, notes, and snippets.

@safecat
Created September 27, 2018 02:59
Show Gist options
  • Save safecat/8108a671c8dc6cdedaa4e90431fe2cef to your computer and use it in GitHub Desktop.
Save safecat/8108a671c8dc6cdedaa4e90431fe2cef to your computer and use it in GitHub Desktop.
BetterTouchTool判断网易云音乐是否在播放
if application "网易云音乐" is running then
tell application "System Events"
tell process "NeteaseMusic"
if get title of menu item 1 of menu 1 of menu bar item "控制" of menu bar 1 = "播放" then
return "play"
else
return "pause"
end if
end tell
end tell
end if
return "play"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment