[Solved] Re: Best Strategy to Control iTunes

On Mar 30, 2009, at 5:44 PM, Ammar Ibrahim wrote:

- It's known that if any dialog is open in iTunes it freezes any
communication through the scriptable interface, how can I detect that and
put all my "messages" in a queue, so that when iTunes is responsive, I
send my messages?

What kind of task are you trying to accomplish? Are you sure you have to
know whether a dialog is open in iTunes? AFAIK you can't do anything
similar, in any application.

If I want to add a track to iTunes, I need to make sure iTunes is

Interestingly enough, iTunes sends a distributed notification (listenable via NSDistributedNotificationCenter) whenever it shows or hides a modal dialog. It even sends the resource ID (in the iTunes.rsrc file) of the particular dialog along with the "show" notification.

I don't have the specific notification name on hand here at work, but you can easily discover it by writing a simple test app that listens for every distributed notification.

Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to maillists@xxxxxxxxx