I'm a fairly newb Cocoa programmer looking to send Apple Events to iTunes (and receive responses in some cases).
As I understand it, I have four options:
To top it all off, I suspect that I'll need to send the events asynchronously to avoid bringing my GUI to a grinding halt, and keep it from crashing if (when) iTunes does. Is that even possible if I'm using high-level code that works from an AppleScript?
Does anyone have any advice?
As I understand it, I have four options:
- Use the Carbon routines for this, which look really scary.
- Use NSAppleScript to generate Apple Events from AppleScripts. AFAIK I won't be able to use compiled scripts in cases where I want to use variables in my App as part of the script, so performance will suffer.
- Use NSAppleEventDescriptor with NSAppleScript to generate Apple Events in code. I'm not sure how difficult this would be.
- Use a third-party Objective-C wrapper, such as this:
http://homepage.mac.com/nathan_day/pages/s...plescriptobject
To top it all off, I suspect that I'll need to send the events asynchronously to avoid bringing my GUI to a grinding halt, and keep it from crashing if (when) iTunes does. Is that even possible if I'm using high-level code that works from an AppleScript?
Does anyone have any advice?