Parameters with run handler
Parameters with run handler
- Subject: Parameters with run handler
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 08 Jan 2002 21:34:49 -0800
Am I imagining it, or have I read here that it is possible to include a
parameter in list braces for a run handler, and to call it from another
script using the parameter, something like this:
tell application "Applet"
launch
run {someParameter}
end tell
or
set f to load script file aCompiledScriptsPath
tell f to run {someParameter}
where the script application or compiled script in question has a run
handler:
on run {someParameter}
--script
end run
I can find nothing about this in the ASLG or O'Reilly's Nutshell, and it
doesn't seem to work in OS X. So I must be imagining it. But I'd swear I
read about it here.
In the case of the compiled script or non-stay-open applet, it doesn't
matter: you can just change a property when you load the script, and store
it if necessary, or not. But a stay-open applet is "busy" if open, so you
can't store a property change. Being able to use a parameter would be a
great help.
--
Paul Berkowitz