Re: Results differ in editor and applet
Re: Results differ in editor and applet
- Subject: Re: Results differ in editor and applet
- From: Walter Ian Kaye <email@hidden>
- Date: Wed, 3 Mar 2004 15:51:20 -0800
At 01:03p -0800 02/26/2004, Chris Espinosa didst inscribe upon an
electronic papyrus:
On Feb 26, 2004, at 12:08 PM, Mr Tea wrote:
> This from Paul Berkowitz - dated 26/2/04 6.26 pm:
>
>> To make the app's dictionary accessible to the script, include this
>> near the
>> top of the script, before you call the application:
>>
>> run script "tell application \"iTunes\"
>> end tell"
>
> This works (thanks, Paul), but I don't really understand why. Is this
> another piece of undocumented AS esoterica?
>
> Maybe one of the AS insiders here could explain it?
Because the AppleScript runtime (the part that runs the scripts)
doesn't want to invest the extra time in loading all the information
that's needed in order to compile and syntax-check scripts if it's not
necessary. The textual representation of event, class, and parameter
names is needed only when you compile a script (or when an error is
being reported), so it's not loaded when you're just running scripts.
Of course, because the Script Editor is compiling scripts, it's loaded
when you're running the script in the Script Editor.
If you need to load a brand-new osax to run a script (Jaguar and Panther),
is anything fancy needed to load it?
Let's say you distribute a script and an osax together, and the osax needs
to be loaded for the script to use it. What is the best (user-friendly) way
to go about it?
thanks,
-Walter
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.