Re: Modification Date of Bundle script not changing
Re: Modification Date of Bundle script not changing
- Subject: Re: Modification Date of Bundle script not changing
- From: kai <email@hidden>
- Date: Thu, 17 Nov 2005 05:10:33 +0000
On 17 Nov 2005, at 02:59, Brett Conlon wrote:
Is it just me or does the modification date of a bundle script not
change if you drop it onto Script Editor, make a change and save it?
Is it only changing a small part of the app bundle and therefore
isn't changing the modification date of the whole thing?
I've made 3 changes to the script today (Thurs) and some yesterday,
but the date still shows as 12pm Tuesday. I think that may have
been the last time I did a save-as... which surely would change the
modified date.
No, it's not just you, Brett. The bundle's modification date seems to
stick with the creation date - even after the addition of new files.
However, I wouldn't try the modification date of the main script
inside the bundle, either - since this can change each time the
script is run. Your best bet might be to aim for the Info.plist which
is modified during a save.
To test this for yourself, save the script below as an application
bundle, then run it a few times, saving occasionally. (Don't try to
run it from Script Editor, since it will error - due to differences
between SE's bundle structure and that of a regular script application.)
----------------------------
set bundlePath to path to me
set scriptPath to POSIX file (POSIX path of (path to resource ¬
"Scripts" in bundle bundlePath) & "main.scpt")
set plistPath to POSIX file (POSIX path of bundlePath & "Contents/
Info.plist")
set dateList to {}
repeat with p in {bundlePath, scriptPath, plistPath}
tell modification date of (info for p) to set dateList's ¬
end to short date string & " - " & time string
end repeat
tell dateList to set dlog to "bundle:" & tab & item 1 & return ¬
& "script:" & tab & item 2 & return & "plist:" & tab & item 3
display dialog dlog
----------------------------
PS: Can I go to bed now? ;-)
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden