Re: variables vrs properties
Re: variables vrs properties
- Subject: Re: variables vrs properties
- From: Axel Luttgens <email@hidden>
- Date: Thu, 6 Jan 2011 11:53:34 +0100
Le 6 janv. 2011 à 00:05, Stockly, Ed a écrit :
> That's odd, when I use 'run script' with Shane's version or Yvan's I get the
> same error in Script Debugger:
>
> An error of type -30002 has occurred.
>
> But when I use 'tell' in my verison, it works, even without using 'my' and
> without changing the order.
>
> Wait a minute ... Shane's version works in Script Editor but not Script
> Debugger, does SD handle script objects differently? And mine works in SD
> but not SE (displays an empty dialog).
>
> Maybe that's why I don't trust script objects!
>
> I'm on Tiger, could that make a difference?
>
> ES
Hello Ed,
Strictly speaking, the Standard Additions command "run script" expects:
- either a string, which it will compile
- or a reference to a file, which it will read from (and possibly compile)
and then runs the resulting script object (sends it a run command).
In the case of Yvan's or Shane's code, do_the_duty already identifies a script object. So, it just needs to receive a "run" command:
tell do_the_duty to run
or, equivalently:
run do_the_duty
It seems that Script Debugger is just more "compliant" (or less "permissive") than Script Editor.
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