Skip to content

Instantly share code, notes, and snippets.

@floq-design
Last active December 29, 2015 15:59
Show Gist options
  • Save floq-design/7694571 to your computer and use it in GitHub Desktop.
Save floq-design/7694571 to your computer and use it in GitHub Desktop.
Pause Songbird with AppleScript
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