• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: osascript and Modification Date of Compiled Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: osascript and Modification Date of Compiled Script
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: osascript and Modification Date of Compiled Script (From: "John W. Baxter" <email@hidden>)

  • Prev by Date: Re: osascript and Modification Date of Compiled Script
  • Next by Date: Re: AC power testing
  • Previous by thread: Re: osascript and Modification Date of Compiled Script
  • Next by thread: Re: osascript and Modification Date of Compiled Script
  • Index(es):
    • Date
    • Thread