Re: best practice with helper AppleScript
Re: best practice with helper AppleScript
- Subject: Re: best practice with helper AppleScript
- From: Nathan Day <email@hidden>
- Date: Wed, 25 Jun 2003 21:23:18 +0930
If you go to my web site you can find a project for running apple
scripts from with cocoa, it was released before apples NSAppleScript
class but it still has some advantages of NSAppleScript. The project
contains a category of NSAppleEventDescription which contains a method
that will take an NSArray of NSString paths or NSURL's and return a
NSAppleEventDescription of a list of aliases which you can pass to an
AppleScripts run handler. My NDAppleScriptObject class also has a
method which creates an NSAppleEventDescription for an open event. You
can pull that to bits if you want. I plan to update my
NDAppleScriptObject project to allow greater mixing of my code with
NSAppleScript but I have had time yet.
On Wednesday, June 25, 2003, at 10:49 AM, Christopher Corbell wrote:
Here is the context:
- the script operates on a third-party app
- the only thing about the script which changes at runtime
is the file path (which is passed to the third-party app in
a tell statement)
Here are the options I've explored:
1) Since the script is small, include it as hard-coded text and
interpolate the variable HFS file path into this source at runtime.
Then compile and launch it with NSAppleScrip,t or with Carbon
facilities.
2) Include the script inside the app bundle. Pass the location
of the file as a parameter to the script.
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.