Re: Calling a script with parameters failing with error -1708
Re: Calling a script with parameters failing with error -1708
- Subject: Re: Calling a script with parameters failing with error -1708
- From: has <email@hidden>
- Date: Sat, 15 Nov 2008 15:21:51 +0000
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 (email@hidden)
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:
This email sent to email@hidden