MACSCRPT Archives

June 2011

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Christopher Stone <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 13 Jun 2011 09:50:05 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
On Jun 13, 2011, at 09:06, Emmanuel LEVY wrote:
> I don't even know how you set a modification date...
______________________________________________________________________

Hey Emmanuel,

Mark's script works nicely, but it is also easily done with vanilla Applescript:

tell application "Finder"
	try
		set sel to (selection as alias list)'s first item
		set modification date of sel to (current date)
		
	on error errMsg number errNum
		set sep to "=============================="
		set e to sep & return & "Error: " & errMsg & return & sep & return ¬
			& "Error Number: " & errNum & return & sep
		beep
		display dialog e
	end try
end tell

--
Best Regards,
Chris

ATOM RSS1 RSS2