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
Look at me, I own a bunch of things and everyone must know about every single one.
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

Similar Threads
thread Thread Starter Forum Replies Last Post
Itunes applescript. evanhughes Mac Programming 2 Feb 28, 2013 05:58 PM
OSX download paused jerriji OS X 10.8 Mountain Lion 1 Feb 26, 2013 10:20 PM
iTunes Applescript Help NightStorm Mac Applications and Mac App Store 2 Dec 16, 2012 02:52 PM
Printer Paused when printing From Macbook MTMan Mac Basics and Help 2 Jun 6, 2012 04:27 PM

Forum Jump

All times are GMT -5. The time now is 06:02 PM.

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

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC