Re: Best Strategy to Control iTunes
2009/3/30 Ammar Ibrahim <ammar.ibrahim@xxxxxxxxx>
> I'm currently developing an App in iTunes, and I'm new to Cocoa and the
> entire Mac development world. So far, things are looking great. I have few
> questions, about which is the best strategy to follow in order to
> some tasks. This is a special purpose app, in a controlled environment.
> * Open iTunes if it's not already open.
> - Is using NSWorkSpace the best way to launch iTunes? Or should I use
> a different method? What ar the side effects if the application was already
Using NSWorkspace's -launchApplication: is fine. If the app was already
running when you called it, the method won't do anything, as you can read
from the documentation.
> - How can I detect if iTunes is not responding? I'd like to force quit
> it, and open it again
I'm not sure you can actually do that.
> - In a nutshell, I'd like iTunes to be open all times, and responsive,
> how can I guarentee this?
Just praying. :-)
Apple should care about that, not you.
> * Communcation with iTunes
> - What's the best interface to use?
There are many approaches but if you don't tell us what are your purposes we
can't tell you wich approach is the best for your use. However, i suggest
googling for ScriptingBridge.
> - 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 m...
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.
> Thanks in advance,
> 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 luca.pazzerello@xxxxxxxxx
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