We have a lot of code in libraries in Applescript. Now starting to look at using Cocoa to move forward, as we are really using Applescript to pretty much its limit.

But it is not a short term solution to rewrite all our Applescript libraries in Objective-C. We need to be able to use Objective-C programs to load and execute our Applescripts.

I've managed to get a program to execute an Applescript and to execute a handler in an Applescript.

But most of our libraries are saved as Script Objects. Please could someone point me in the right direction for executing a subroutine inside a script object in an Applescript.

I'm guessing I could do something like:

NSApplescript *scriptObject = [[NSAppleScript alloc] initWithSource: @"set scriptObject to (scriptObjectName of (load script file scriptPath))
                                                                                     
                              tell scriptObject to doHandler()"];

and execute it, but that seems to be quite klunky. There must be a neater way to do it.

Any advice, hints and links will be gratefully received.

Thank you

Karen






_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to