Send to Evernote with creation date sync

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Send to Evernote with creation date sync Wed Mar 02, 2016 5:41 am • by natiugango
Hi,

I would like to files added to the folder were automatically sent to Evernote. At the same time I would like to synchronize the creation dates. File creation date should be assigned to the note.

Until now, I used the script:

Code: Select all
on run {input}
   tell application "Finder"
      repeat with theFile in input
         try
            set theFileName to (text items 1 thru ((length of (name of theFile as string)) - 4) of (name of theFile as string)) as string
            set theFileDate to (the creation date of theFile)
            set modFileDate to (the modification date of theFile)
            set theNotebook to "Ideas"
            tell application "Evernote"
               create note title theFileName from file theFile created theFileDate notebook theNotebook
            end tell
         end try
      end repeat
   end tell
end run


Unfortunately, this method does not work with Hazel.
Does anyone have an idea how to get it to work?

K.
natiugango
 
Posts: 2
Joined: Wed Mar 02, 2016 5:29 am

Re: Send to Evernote with creation date sync Wed Mar 02, 2016 12:34 pm • by Mr_Noodle
You need to use a different handler and arguments to use the script with Hazel. Search the help for "AppleScript" as it documents it all there.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I found this (if someone will need it):

Code: Select all
tell application "Evernote"
   activate
   set note1 to create note from file theFile notebook "Evernote notebook name"
   set (creation date of note1) to item 1 of inputAttributes
   set (modification date of note1) to (creation date of note1)
end tell


and I set the inputAttributes "Date Created".
natiugango
 
Posts: 2
Joined: Wed Mar 02, 2016 5:29 am


Return to Support