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: Ken Tozier <email@hidden>
- Date: Sat, 15 Nov 2008 13:09:52 -0500
Thanks for the reply. I just tried it, but no luck. Still getting a
"event not handled" error. The script runs fine from the Script editor
so all I can think of is that the subroutine option is broken in both
NSAppleScript and OSAScript. Is this a known bug in Apple's script
frameworks? I've tried using both "ReplaceFolioDates" and
"replacefoliodates" but both give me the exact same error.
The script itself is extremely simple
on ReplaceFolioDates(inDate)
tell application "QuarkXPress"
tell master document 1
set every text of text boxes of spreads where it is "FOLIO_DAY,
FOLIO_MONTH, FOLIO_DATE, FOLIO_YEAR" to inDate
end tell
end tell
end ReplaceFolioDates
It seems to me that there must be some arcane detail I'm missing
because I can't imagine that Apple wouldn't allow applications to run
scripts with parameters and yet nothing I've tried ever works.
On Nov 15, 2008, at 10:21 AM, has wrote:
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.
_______________________________________________
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