Re: Check if iTunes is playing?
Re: Check if iTunes is playing?
- Subject: Re: Check if iTunes is playing?
- From: "Shane Stanley" <email@hidden>
- Date: Mon, 4 Apr 2005 09:09:42 +1000
On Sun, 3 Apr 2005 12:00:03 -0400, Neil Lee wrote:
>Is this the "best' way to check if iTunes is playing? I want to do a
>check if iTunes is playing, and if it isn't I want the script to exit.
>
>if not (player state as string is "playing") then return
No. Don't coerce keywords to strings. When you run that in a script
editor, with the dictionary of iTunes available to it, playing will
coerce to "playing". When you run it elsewhere, the script won't bother
opening the dictionary, so you'll get "KPSP". If you want the comparison
to work, use "if not (player state is playing) then return".
--
Shane Stanley <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden