Re: New iTunes Track
Re: New iTunes Track
- Subject: Re: New iTunes Track
- From: Matthew Smith <email@hidden>
- Date: Wed, 25 Feb 2004 13:10:23 +1100
on 25/02/2004 10:55, Greg Townsend at email@hidden wrote:
>
Is there a way to use AS to determine when the track playing in iTunes
>
changes? I know you can use an idle handler, but I'd rather not have to
>
poll iTunes any more than is necessary, and I'd also like to know when
>
the track changes. Thanks.
There's no other way, other than polling. For it to be otherwise you would
need iTunes to be able to notify you when there is a change, which it can't
do. Each time you should record the current id of the track and compare it
to the previous time you checked. If it is different then the track has
changed.
There seems to be a lot of times where people want to run an AppleScript
when specific events occur, like know when an application is launched or
quit. Unfortunately that's not how AppleScript was designed to work.
--
Matthew Smith
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.