• 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: Paul Berkowitz <email@hidden>
  • Date: Thu, 18 Mar 2004 10:11:20 -0800

On 3/18/04 9:27 AM, "Jeffrey Berman" <email@hidden> wrote:

> Thanks to everyone who responded to my question about running a compiled
> AppleScript from a Unix shell using the 'osascript' command without altering
> the modification date of the script file.
>
> Because the scripts I will be running can have properties and subroutines
> using global variables, the approach of making all variables local is not a
> solution for my situation. Using the shell 'cp' command to create a
> temporary copy of the script and then running the copy would work. However,
> the suggestion to use the -e option on 'osascript' seems simpler, as in:
>
> osascript -e 'run script (POSIX file "'$HOME'/Desktop/TestScript")'
>
> The above command runs the script file without changing the modification
> date, whether or not there are global variables in the script. In contrast,
> the file modification date is changed if the command is:
>
> osascript ~/Desktop/TestScript

'run script' loads a copy into memory and runs that, so it won't affect the
file itself, true. It sounds like your best bet. (Perhaps 'load script' and
'run' the result also would work, but you might need just a single line for
the -e option of osascript, so 'run script' is best).

--
Paul Berkowitz

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


References: 
 >Re: osascript and Modification Date of Compiled Script (From: Jeffrey Berman <email@hidden>)

  • Prev by Date: make new master page
  • Next by Date: Re: how to eject a firewire drive natively
  • Previous by thread: Re: osascript and Modification Date of Compiled Script
  • Next by thread: do shell script & Unicode
  • Index(es):
    • Date
    • Thread