Jump to content
  • 0

(Archived) Script Creates Evernote Note & Calendar Reminder with Link


Lew

Idea

I’ve come up with an Applescript that will save a document to Evernote and also create a Calendar event as a reminder to follow-up in seven days.  The Calendar entry also contains a link to the note.  If you use Evernote on an iOS device, the link will open Evernote and the note.


 


The script was created for use with Hazel, but could be modified to function as a folder action.


 


In order to use the Applescript as is, you need to create the following:


 


A folder named “Save PDF to Inquiries” in ~/Library/PDF Services/


 


A Calendar called “To Do” in the Calendar application.  The event created by the Applescript will be an all day event.  I have the default alarm for all day events set at 9:00am in Calendar preferences.


 


Create a notebook in Evernote called "Inquiries"


 


In the print dialog, select "Save PDF to Inquiries" from the PDF drop down menu to start the process.


 


I’m not a coder, so what this Applescript achieves could likely have been done in a much more efficient manner.  Please feel free to make suggestions.


 


Enjoy…


 


Lew


 


 


Hazel Rule


 


6c99ffa6-9ba7-4dfe-a5e7-34803741ed21_zps


 


 


Evernote Inquiry.scpt



on hazelProcessFile(theFile)
tell application "System Events"
display dialog "Enter Note Title" default answer ""
set noteTitle to text returned of result

tell application id "com.evernote.Evernote"
synchronize
delay 5

create note from file theFile notebook {"Inquiries"} title {noteTitle} tags {"Inquiry"}

set worklogs to find notes "tag:Inquiry"
set newestLog to item 1 of worklogs
repeat with worklog in worklogs
if creation date of worklog is greater than creation date of newestLog then
set newestLog to worklog
end if
end repeat
synchronize
delay 2
set noteURL to note link of newestLog
delay 2
end tell

tell application "Calendar"
tell calendar "To Do"
set theDate to ((current date) + 7 * days)
set newEvent to make new event at end with properties {description:"Evernote Inquiry", summary:"EN: " & noteTitle, start date:theDate, end date:theDate, url:noteURL, allday event:true, status:confirmed}
end tell
end tell
end tell
end hazelProcessFile

Link to comment

0 replies to this idea

Recommended Posts

There have been no replies to this idea yet

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...