/ Published in: AppleScript
Checks to see if iTunes is running and is playing / pausing a song and then does the opposite if it is.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
tell application "System Events" if (name of processes) contains "iTunes" then set iTunesRunning to true else set iTunesRunning to false end if end tell if iTunesRunning then tell application "iTunes" if player state is paused then play else if player state is playing then pause end if end tell end if