• 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 and AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes and AppleScript


  • Subject: Re: iTunes and AppleScript
  • From: John Stiles <email@hidden>
  • Date: Mon, 28 Aug 2006 19:24:14 -0700

On Aug 28, 2006, at 6:08 PM, John Stiles wrote:

On Aug 25, 2006, at 2:19 PM, email@hidden wrote:

Hi John,

On 25 Aug 2006, at 19:36, John Stiles wrote:
Getting back to the original question—anyone have any luck with scripting iTunes via an AppleEvents API that does honor timeouts and the like?
If so, any pointers would be extremely welcome. I haven't used low-level AppleEvents very much (other than the Standard Four Handlers).


Check out this framework: <http://www.liquidx.net/eyetunes/>

It may help you here with achieving your goal. It's nice, BSD licenced, although it could be objectified a bit. Definitely a good starting point.

Yeah, this is actually pretty awesome. Thanks for the link. I'm not going to use any of it directly, but it is a great starting point to get the hang of AppleEvents.


I'm actually redoing everything to use AESendMessage with either "kAENoReply | kAENeverInteract" or "kAEQueueReply | kAENeverInteract". It's a little roundabout, and not nearly as easy as using real AppleScripts, but it's not that hard either. It's just a lot of typing :) I'm not entirely done yet but the initial results are darn promising!

It's a shame that we don't have a utility which can automatically generate AEBuildAppleEvent descriptions. (At least, I couldn't find one.) You can get close with "gdb-aedesc" (search ADC for it) but the format is goofy and it needs hand-translation, which is tedious and a bit error-prone.

I've wrapped this up and it works great. Much better than the NSAppleScript solution.
It's a lot more code, since I'm just blasting raw AppleEvents around, but performance is great and there's no more blocking anywhere. If I need a response, I use a callback.



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: iTunes and AppleScript (From: Matt Neuburg <email@hidden>)
 >Re: iTunes and AppleScript (From: John Stiles <email@hidden>)
 >Re: iTunes and AppleScript (From: email@hidden)
 >Re: iTunes and AppleScript (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Contextual Menu doesn't respond to control+click
  • Next by Date: Re: Links in NSTextField
  • Previous by thread: Re: iTunes and AppleScript
  • Next by thread: Re: Re: iTunes and AppleScript
  • Index(es):
    • Date
    • Thread