• 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: "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.


  • Follow-Ups:
    • Re: osascript and Modification Date of Compiled Script
      • From: Doug McNutt <email@hidden>
References: 
 >osascript and Modification Date of Compiled Script (From: Jeffrey Berman <email@hidden>)

  • Prev by Date: Re: GUI Scripting mystery
  • Next by Date: Re: osascript and Modification Date of Compiled Script
  • Previous by thread: osascript and Modification Date of Compiled Script
  • Next by thread: Re: osascript and Modification Date of Compiled Script
  • Index(es):
    • Date
    • Thread