Last active
December 29, 2015 15:59
-
-
Save floq-design/7694571 to your computer and use it in GitHub Desktop.
Pause Songbird with AppleScript
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
to pauseSongbird() | |
tell application "System Events" | |
tell process "Songbird" | |
tell menu bar 1 | |
tell menu bar item "Controls" | |
tell menu "Controls" | |
set state to get name of menu item 1 | |
-- display dialog state | |
if state is equal to "Pause" then | |
click menu item 1 | |
return | |
end if | |
end tell | |
end tell | |
end tell | |
end tell | |
end tell | |
end pauseSongbird | |
on appIsRunning(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end appIsRunning | |
if appIsRunning("Songbird") then | |
pauseSongbird() | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment