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: Jeffrey Berman <email@hidden>
- Date: Thu, 18 Mar 2004 11:27:53 -0600
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
-Jeffrey Berman
_______________________________________________
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.