Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old May 25, 2009, 06:55 PM   #1
macrumors 601
sammich's Avatar
Join Date: Sep 2006
Location: Sarcasmville.
Applescript: how to tell if iTunes is paused

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:

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?
Official MR IRC
Slow news day? Never fear, Digitimes is here. Serving up free hits for techblogs everywhere.
sammich is offline   0 Reply With Quote
Old May 25, 2009, 10:40 PM   #2
macrumors 6502a
Join Date: Jan 2005
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..

tell application "iTunes"
		set whatshappening to (get player state as string)
	end try
	if whatshappening = "paused" then
		return "its paused"
	end if
end tell
mrzeve is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How to tell if Spotlight is Indexing? zepharus OS X 3 Nov 20, 2009 01:39 AM
How to tell if MBP is BRAND new or not. jshelton MacBook Pro 7 Jun 16, 2009 03:31 PM
How to tell if it is legit nowaytobequiet Buying Tips and Advice 5 Oct 14, 2008 04:13 PM
How to tell if Leopard is near gold.. rmeyer52 OS X 10 Oct 3, 2007 11:58 PM
(airport) how to tell if someone is leeching my bandwidth and if so stop it poohat1000 OS X 9 Dec 11, 2005 07:07 PM

All times are GMT -5. The time now is 12:13 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013,, LLC