Re: osascript and Modification Date of Compiled Script
Re: osascript and Modification Date of Compiled Script
- Subject: Re: osascript and Modification Date of Compiled Script
- From: "John W. Baxter" <email@hidden>
- Date: Wed, 17 Mar 2004 08:03:15 -0800
On 3/17/2004 5:03, "Jeffrey Berman" <email@hidden> wrote:
>
Is there a way to run a compiled AppleScript from a Unix shell using the
>
'osascript' command without altering the modification date of the script
>
file?
Yes.
>
>
For example, if I save a compiled script named "TestScript" to the desktop
>
containing the single command:
>
>
set TestVar to 1
>
>
and run this script from a Terminal shell with the command:
>
>
osascript ~/Desktop/TestScript
>
>
the modification date of the file "TestScript" changes.
As you wrote the script, TestVar is a global variable. The values of global
variable persist between runs by being stored in the script file (given
well-behaved script runners). Change the script to
local TestVar
set testvar to 1
Numerous alternative changes are possible which also make the variable not a
global.
Now, why does osascript on my Panther 10.3.2 installation (10.3.3 comes
later this week when I've seen more pioneers taking arrows) say this (and
then run the script):
## Component Manager: attempting to find symbols in a component alias of
type (regR/carP/x!bt)
--John
_______________________________________________
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.