Created
May 4, 2011 16:57
-
-
Save smerrill/955566 to your computer and use it in GitHub Desktop.
Play / Pause Amazon Cloud Player
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
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