Re: Load Script
Re: Load Script
- Subject: Re: Load Script
- From: Axel Luttgens <email@hidden>
- Date: Fri, 27 May 2011 23:40:24 +0200
Le 27 mai 2011 à 00:20, Luther Fuller a écrit :
> On May 26, 2011, at 4:05 PM, Axel Luttgens wrote:
>
>> OK, I guess some miscommunications occurred throughout this thread...
>> Because of differing runtime environments.
>
> I was not running anything from within the Smile or AS Editors.
But I (as well as Stan at least, I believe) was running my snippets from AppleScript Editor while trying to reproduce what you were elliptically describing...
> I think the similarity between the commands
>
> run script scriptFileAlias
>
> and
>
> run (load script scriptFileAlias)
>
> is the source of the confusion.
>
> They seem, at first, to do exactly the same thing.
No, they are quite different.
> However, the first is a StandardAdditions command, while the second is an AppleScript command.
No, the second involves a Standard Additions command ("load script") then sends an event ("run").
> The first seems to be running a script object as if it were 'run (script scriptFileAlias)', but it's not.
Yes, there are two words ("run" and "script") making up a single keyword ("run script").
By itself, a construct such as "script scriptFileAlias" doesn't seem to be defined anywhere in the language.
> I think that the inability of the first command to include access to the parent script's properties must be a bug.
> I can't think of any good reason to include the parent's handlers, but not it's properties. It just doesn't add up.
Or, as I wrote in my previous post, the ability to access the caller's handlers should perhaps be viewed as a side-effect of the fact that the caller is run as an application.
After all, it doesn't make very much sense for a script supposed to be a standalone entity liable to be called from everywhere to depend on characteristics of the caller.
Moreover, I'm not sure that the notion of parent (and, more generally, of inheritance in AppleScript sense) is relevant in this precise context.
But again, I may be wrong. ;-)
Axel
_______________________________________________
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