Ken Tozier wrote:

I've been trying off and on for a couple of days to run a script that
requires parameters. [...]

My code is running as a Quark XTension so I may be setting up the
"targetAddress" incorrectly.

If you're constructing Apple events to pass to - executeAppleEvent:error:, the address isn't important and a null descriptor will do.


Could someone take a look at the
following snippet and point out where I'm messing up?

The event class and id for invoking a script handler whose name is a user-defined identifier should be kASAppleScriptSuite and kASSubroutineEvent. (e.g. There's an example project, CallAppleScriptHandler, in the objc-appscript repositorythat shows how to do this.) Though as you're using OSAKit and your subroutine takes positional parameters, you could just use -[OSAScript executeHandlerWithName:arguments:error:] instead.

HTH

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to