Re: Suggestion: iTunes needs a refresh event
Re: Suggestion: iTunes needs a refresh event
- Subject: Re: Suggestion: iTunes needs a refresh event
- From: Mr Tea <email@hidden>
- Date: Sun, 14 Mar 2004 19:38:07 +0000
On 14 Mar 2004, at 3.40 pm, Gnarlodious wrote:
I'd like to see iTunes send a "Playing a new song" event.
Any support on this one?
Theoretically, yes, although I wouldn't know how to go about detecting
that event. At present, I use a stay-open applet that checks iTunes
every 5 seconds and writes information about the current track into a
DragThing dock. It runs smoothly without any perceptable performance
hit, but a little part of me feels uncomfortable about all the
redundant checking that goes on.
The script is structured something like this [caution to code-lifters,
the following is not an actual script]:
on idle
get current track from iTunes
if current track is not previous current track then
do stuff with track info
end if
return 5
end idle
What I would like to know is how to go about setting up a similar
applet that does what it does on receiving a "Playing a new song"
event, instead of constantly polling iTunes for changes and acting only
when a change is detected.
Thanks,
Mr Tea
--
Brew of the Day: Taylor's Special Reserve Tippi Assam
_______________________________________________
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.