Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sammich

macrumors 601
Original poster
Sep 26, 2006
4,305
268
Sarcasmville.
I can get iTunes to give me the player state, it will give me a string like <constant ****kPS#>, where # is "p" for paused, "P" for playing, and "S" for stopped.

This should be cake:

Code:
set thechar to character 18 of (player state)
if thechar is equal to "p" then set ispaused to true

Now I discover AS is more or less case-blind/insensitive. Is there a way I can do this?
 

mrzeve

macrumors 6502a
Jan 25, 2005
617
1
I'm not entirely sure what it is you are asking..but here is how I used Applescript to check if iTunes was paused. It works without any issues..

Code:
tell application "iTunes"
	try
		set whatshappening to (get player state as string)
	end try
	
	if whatshappening = "paused" then
		return "its paused"
	end if
	
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.