Re: Adding files to iTune library in Cocoa app
Re: Adding files to iTune library in Cocoa app
- Subject: Re: Adding files to iTune library in Cocoa app
- From: has <email@hidden>
- Date: Tue, 26 Jun 2007 18:40:27 +0100
Tom Harrington wrote:
// Compile (or load) AppleScript
NSAppleScript *scpt = [[NSAppleScript alloc] initWithSource:
@"on run {arg1, arg2}\n return arg1 & arg2
\n end"];
// Send event to AppleScript
NSDictionary *error;
NSAppleEventDescriptor *resDesc = [scpt
executeAppleEvent:evtDesc
error:&error];
NSAppleScript's docs indicate that -executeAppleEvent:error: can't be
used to send Apple events to other applications. In the present
context-- sending events to iTunes-- it doesn't look as though the
above approach would work. Is your framework somehow overriding this
behavior?
My code sends an Apple event to an AppleScript, not an application,
and what the AppleScript does then is its own business. I think what
the documentation is trying to say is that -executeAppleEvent:error:
can't be used as a sort of ersatz AESend.
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html
_______________________________________________
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