Re: Load Script
Re: Load Script
- Subject: Re: Load Script
- From: Luther Fuller <email@hidden>
- Date: Thu, 26 May 2011 09:53:40 -0500
More experimenting.When a script file is called this way ...
tell application "Finder" to (file "called.scpt" of container of (path to me)) as alias run (load script the result)
handlers and properties in the parent calling script are available in the called script.
If you try to use either of these examples ...
(* tell application "Finder" to (file "called.scpt" of container of (path to me)) as alias run script the result -- properties are unavailable. *)
(* tell application "Finder" to (file "called.scpt" of container of (path to me)) as alias run script (load script the result) -- properties are unavailable. *)
handlers, but NOT properties, are available in the called script. In other words, avoid using 'run script ...'.
'run script' is defined in the Standard Additions dictionary, while 'run' is in the AppleScript dictionary and only applies to applications. This is why I trust experiments and not the dictionaries.
|
_______________________________________________
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