Re: Creating a script that can set its own modification date
Re: Creating a script that can set its own modification date
- Subject: Re: Creating a script that can set its own modification date
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 29 Nov 2007 08:57:31 -0500
On Nov 28, 2007 8:20 PM, Michelle Steiner <email@hidden> wrote:
> tell application "System Events"
> set the modification date of (path to me) to ((current date) + 10 *
> days)
> end tell
That still has the same problem as David's original shell solution -
when run as a compiled script, the auto-save at the end undoes the
work. Every time you run a compiled script its mtime gets reset to
now.
The read-only trick Chris suggested is a fine workaround if you don't
need to persist any properties. Other solutions include having a
second script that resets the mod time on the first, or a scheduled
task via launchd or cron that resets it periodically (say, once a
minute).
But I suspect the actual solution for the problem at hand would
involve sorting by a different set of criteria. Maybe with a fuller
description of what you're trying to accomplish?
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden