• 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: iTunes programming question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes programming question


  • Subject: Re: iTunes programming question
  • From: has <email@hidden>
  • Date: Tue, 11 Jul 2006 17:21:02 +0100

 Philip Lukidis wrote:

Thanks for your answer. Right now I'm doing preliminary research only because I have not received any specifications yet. Perhaps when I know more I could post a more specific question.

I had found the Apple Events documentation, but I was hoping that Apple would have documentation on the AE necessary for communicating with iTunes. That was quite optimistic as it turns out.

You won't find anything that specific; heck, most application developers don't provide any documentation beyond a dictionary resource (yes, this is lame). But if you know how to construct an AE and you know the application's scripting interface, putting the two together is straightforward.


Have you done application scripting before, know how the Apple Event Object Model works, etc? If not, it'd be a good idea to do some background reading first as the basic principles are the same from app to app (though quality and consistency do vary). There's a good overview of the original technology at <http://www.cs.utexas.edu/ users/wcook/papers/AppleScript/AppleScript95.pdf>. Matt Neuburg's book might be worth a look - it's the most programmer oriented. There's also a discussion and tutorial in the appscript documentation on my site.

For finding your way around iTunes, it's mostly a case of read its dictionary, look at existing scripts, experimenting yourself and asking about when you get stuck. Suggest you start here: <http:// www.apple.com/applescript/itunes/index.html>


As for the development language, I assume for now that I would be using Objc. This online resource http://www.cocoadev.com/index.pl? CallAppleScriptFunction coupled with Apple's documentation is a useful starting point for me.

Calling into AS is useful if a decent chunk of your code is written in it. If you're doing pretty much everything in ObjC anyway then you might as well use the Cocoa API to build your AE descriptors (easier than using Carbon) and the Carbon API for the actual sending (Cocoa doesn't have an equivalent to AESend, so you still have to dip into Carbon for that). Best to ask on the AS Implementors list about doing that <http://lists.apple.com/mailman/listinfo/applescript-implementors>.


BTW, as Jon says, even if you do the final implementation in ObjC it's still a good idea to prototype it in a scripting language. If AppleScript's not your thing then you might consider Python +appscript; Python's a good cognitive fit for folk coming from a C/ ObjC/C++ background, and a lot more popular with programmer types.

HTH

has
--
http://freespace.virgin.net/hamish.sanderson/


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >RE: iTunes programming question (From: "Philip Lukidis" <email@hidden>)

  • Prev by Date: running an AS from Apple mail
  • Next by Date: Re: running an AS from Apple mail
  • Previous by thread: RE: iTunes programming question
  • Next by thread: RE: iTunes programming question
  • Index(es):
    • Date
    • Thread