Re: How do I call a specific applescript handler and pass arguments?
Re: How do I call a specific applescript handler and pass arguments?
- Subject: Re: How do I call a specific applescript handler and pass arguments?
- From: Jim Correia <email@hidden>
- Date: Sun, 20 Nov 2005 16:15:09 -0500
On Nov 20, 2005, at 3:55 PM, email@hidden wrote:
I'd like to do something similar, but I can't tell from the
NSAppleScript class documentation how I can pass arguments to the
handlers inside the script. The only methods I see just do an execute.
This isn't directly built into NSAppleScript. You'll have to write it
yourself (a category on NSAppleScript might make sense.)
If you were using OSA directly, you'd use OSAExecuteEvent. It looks
like (I haven't done it myself) that NSAppleScript's
executeAppleEvent:error: will get you what you want.
http://developer.apple.com/qa/qa2001/qa1111.html
That QA shows you how to build the event. The event should be of type
kASAppleScriptSuite/kASSubroutineEvent. The parameters to in
keyDirectObject as a list. The subroutine name goes in
keyASSubroutineName an should be lowercase.
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden