Modifying My On-the-Phone AppleScript – iTunes Status

I’ve made a minor modification to my previous iteration of my on-the-phone AppleScript. Here’s the change:

tell application "iTunes"
	if player state is playing or player state is paused then playpause
end tell

In the previous iteration, running on-phone.scpt would start iTunes to playing if it was invoked while iTunes stopped, and then pause iTunes when re-invoked. That doesn’t make sense: if iTunes is stopped, it’s stopped for a reason, and this script shouldn’t change that fact. For me, iTunes is stopped when I’m using AppleScript to invoke RadioSHARK or Pulsar to listen to the radio.

You can download the updated on-phone script.