On Oct 23, 2008, at 5:50 AM, André Berg wrote:
But as we all know, it's never easy, now is it?
My handler of course has three parameters.
on XHandler given message:theMessage
run script theMessage
end XHandler
script Timer
property text_param : missing value
on proc(theMessage)
if (text_param is not missing value) then
XHandler of me given message:text_param
set text_param to missing value
else
XHandler of me given message:theMessage
end if
end proc
end script
--set Timer's text_param to "beep\ndisplay dialog \"beep\" buttons {\"OK\"} default button \"OK\" with icon stop"
Timer's proc("beep\ndisplay dialog \"beep\" buttons {\"OK\"} default button \"OK\" with icon stop")
Calling handlers with multiple parameters in a form similar to the above should be documented in the ASLG.
Also the "on run" handler can take a parameter list.
Btw, might be related to this question, the "run script" command has an optional parameter called "in" that is used to specify the scripting component that it should use as execution context, but in my tests I couldn't get it to work. The unicode text to specify is the name of a script object, right?