Return to Snippet

Revision: 37273
at December 7, 2010 19:18 by schlaeps


Initial Code
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

Initial URL


Initial Description
Checks to see if iTunes is running and is playing / pausing a song and then does the opposite if it is.

Initial Title
iTunes Play Pause

Initial Tags


Initial Language
AppleScript