Re: Script Applet rejects first handler call
Re: Script Applet rejects first handler call
- Subject: Re: Script Applet rejects first handler call
- From: Arthur J Knapp <email@hidden>
- Date: Tue, 31 Jul 2001 14:18:20 -0400
>
Date: Tue, 31 Jul 2001 11:29:43 -0400
>
From: email@hidden
>
Subject: Script Applet rejects first handler call
>
Here's something annoying: When I call a handler in a script applet from
>
another script, I get an error on the first call.
>
>
-- "Test": saved as a stay-open Classic applet
>
on h()
>
say "Handler"
>
end h
>
I save that script, and call it with this one:
>
>
tell application "Test"
>
h()
>
end tell
>
>
If "Test" is running, everything works as expected. But if it isn't, I get
>
the
>
error "Can't continue h". The error number is -1708 (errAEEventNotHandled).
This seems to do the trick for me:
tell application "Test"
activate
h()
end tell
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
<
http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters
/AppleScriptLangGuide/>