• 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: Best Strategy to Control iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Strategy to Control iTunes


  • Subject: Re: Best Strategy to Control iTunes
  • From: Nate Weaver <email@hidden>
  • Date: Tue, 31 Mar 2009 16:15:05 -0500

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
can
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
responsive.

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 (email@hidden)

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 email@hidden


References: 
 >Best Strategy to Control iTunes (From: Ammar Ibrahim <email@hidden>)
 >Re: Best Strategy to Control iTunes (From: "Luca C." <email@hidden>)
 >Re: Best Strategy to Control iTunes (From: Ammar Ibrahim <email@hidden>)

  • Prev by Date: Re: custom toolbar item autoresizing?
  • Next by Date: Re: Best way to modify user input into NSTextView
  • Previous by thread: Re: Best Strategy to Control iTunes
  • Next by thread: Re: Best Strategy to Control iTunes
  • Index(es):
    • Date
    • Thread