• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Check if iTunes is playing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Check if iTunes is playing? (From: Neil Lee <email@hidden>)

  • Prev by Date: Re: An Acrobat OSX/OS9 problem?
  • Next by Date: Re: Check if iTunes is playing?
  • Previous by thread: Check if iTunes is playing?
  • Next by thread: Re: Check if iTunes is playing?
  • Index(es):
    • Date
    • Thread