Skip to content

Instantly share code, notes, and snippets.

@smerrill
Created May 4, 2011 16:57
Show Gist options
  • Save smerrill/955566 to your computer and use it in GitHub Desktop.
Save smerrill/955566 to your computer and use it in GitHub Desktop.
Play / Pause Amazon Cloud Player
tell application "System Events"
set frontmost_app to item 1 of (get name of processes whose frontmost is true)
end tell
tell application "Google Chrome"
activate
set i to 0
repeat with t in (tabs of (first window))
set i to i + 1
if title of t is "Amazon Cloud Player" then
set (active tab index of (first window)) to i
do shell script "/usr/local/bin/click -x 104 -y 680"
end if
end repeat
end tell
tell application frontmost_app
activate
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment