I have simple service I'm using to import Evernote files:
on run {input} tell application "Evernote" repeat with x in input try create note from file x on error error_message number error_numbe开发者_如何学运维r display alert "Send to Evernote Failed" message "Error: " & error_message & "" & "Error Number: " & error_number as warning end try end repeat end tell end run
I would like to "create note from file x created d", where d is a date/time that matches that of the original file - but I don't know how to get the date/time (either created or modified) of the original file in a format that is an applescript date.
I appreciate the help!
I don´t know where you´re getting your "input" from, but assuming that with "files" you literally mean files int the Finder, calling Finder to get info on the file in "input" should work like this:
tell application "Finder" to set input to selection
repeat with x in input
tell application "Finder" to set creationDate to creation date of x
end repeat
精彩评论