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: Doug McNutt <email@hidden>
- Date: Wed, 17 Mar 2004 09:39:53 -0700
At 08:03 -0800 3/17/04, John W. Baxter wrote:
>
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.
>
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
Another procedure which would not involve messing with the not-so-clear global/local/property definitions in AppleScript would be to go ahead and lock the script. Then use a UNIX cp on it to a file in /tmp. Use osascript to execute the copy. Cleanup of the tmp file is not required and it will almost surely be executed from cache memory anyway.
--
--> The corporate income tax is a sales tax collected, on behalf of the government, through price increases. It is paid in the end by consumers of the products. <--
_______________________________________________
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.