Re: it's late in the afternoon.. but
Re: it's late in the afternoon.. but
- Subject: Re: it's late in the afternoon.. but
- From: has <email@hidden>
- Date: Thu, 23 Aug 2007 16:47:36 +0100
Wayne Melrose wrote:
why can't I get this to work ..
run script "
on run theScript
theScript's displayDialog()
end run
" with parameters {me}
'run script' is passing a list as the run handler's single parameter,
so to get the first item of that list use:
on run args
set theScript to item 1 of args
theScript's displayDialog()
end run
or:
on run {theScript} -- note use of braces [1]
theScript's displayDialog()
end run
I can already see what some of you are going to say .. the big "why"
question again..
Executing a copy of the main script is a valid technique for use in
applets where the script has non-local state which you don't want
retained when the applet quits (either because it's sensitive
information or because AS's cheeseball interpreter barfs when trying
to serialise it).
HTH
has
[1] See the discussion of parameter patterns at <http://
developer.apple.com/documentation/AppleScript/Conceptual/
AppleScriptLangGuide/AppleScript.df.html>
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden