Re: NSAppleScript: Compiling a script launches an application
Re: NSAppleScript: Compiling a script launches an application
- Subject: Re: NSAppleScript: Compiling a script launches an application
- From: Alexander von Below <email@hidden>
- Date: Fri, 29 Jul 2005 17:09:05 +0200
Am 29.07.2005 um 17:00 schrieb Paul Berkowitz:
Alexander - you can save the save the script you provided as a compiled .scpt made in Script Editor, and include it in the bundle of your application. You can initialize an NSAppleScript object with the URL file path of the script - rather than the uncompiled source code - and just run it. Use initWithContentsOfURL:error and executeAndReturnError: . You can do so with an already-compiled script and it won't re-compile. Just check the documentation. (I guess a Cocoa list would know more if you need more.)
Thanks a lot to all of you for your help.
I may have been too detail-obsessed, but I always like to learn more about technologies I am not that familiar with, such as AppleScript.
Before asking this list, I actually had an idea how to solve the problem: Just find out if iTunes is running "the Darwin (i.e. Unix) way". Now I will to that, but also employ the advice from the list: Save the rest of the script pre-compiled in my bundle - both for performance reasons.
Again, you all have been very helpful!
Alex
|
_______________________________________________
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