• 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: Ammar Ibrahim <email@hidden>
  • Date: Wed, 1 Apr 2009 22:09:48 +0300

On Wed, Apr 1, 2009 at 12:15 AM, Nate Weaver <email@hidden>wrote:

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


Thanks, this was very helpful, I found so far that all iTunes notifications
are prefixed with "com.apple.iTunes". Now, two more questions:

1- How can I open the .rsrc file, and what is it exactly?
2- Is there a way to programmatically close a dialog in another App (e.g.
close the iTunes dialog from an external App)
_______________________________________________

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

  • Prev by Date: Re: [BUG] Cursor Flicker
  • Next by Date: Re: Best Strategy to Control iTunes
  • Previous by thread: Re: Best Strategy to Control iTunes
  • Next by thread: Re: Best Strategy to Control iTunes
  • Index(es):
    • Date
    • Thread