I am trying to write a macro to quickly convert the clipboard content into an Evernote note, which I do many many times a day:
One problem is that in Evernote, contrary to Apple Notes, the title and body belong to different fields. The other is that the note must be filed in a notebook.
The macro should be able to:
create a new evernote note
see 1,2 and 3 steps as red numbers in the image
1- insert the first line of the clipboard contents into the title of the note
2- copy the entire content of the clipboard into the body of the note
3- prompt the user for a notebook to file the note
ideally the clip could contain text, images or a combination of both.
This simple script will work for plain text, but NOT for images or rich text.
For images/rich text body content, you will need to either use UI scripting to paste into the body (probably the simplest), or save the Clipboard as rich text (which would include images) and then import.
Hopefully this simple plain text script will get you started. I'm sure by now you know how to use the script in a KM Macro.
AppleScript to Create New Evernote Note from Clipboard
property ptyScriptName : "Create New Evernote Note from Clipboard"
property ptyScriptVer : "1.0"
property ptyScriptDate : "2019-05-09"
property ptyScriptAuthor : "JMichaelTX"
property noteBookStr : "TEST"
set cbStr to the clipboard as text
set linesList to paragraphs of cbStr
set noteTitleStr to item 1 of linesList
set noteBodyStr to cbStr
tell application "Evernote"
set oAns to display dialog ¬
"Enter or Accept the Notebook Name" default answer noteBookStr ¬
with title "Create New Evernote Note from Clipboard"
set noteBookStr to text returned of oAns
create note with text noteBodyStr ¬
title noteTitleStr ¬
this is the title 09 May 2019
this is the body of the text
thank you very much. I am going to study the macro, test it and give you an update.
Your help is greatly appreciated.
to copy, and then paste text and image, a simple cmd-c initially → cmd-v in the body of the note should work.
I am trying to write my own version. I am grateful for your macro, but there are a few problems in terms of workflow. If I type the notebook name incorrectly, it creates a new notebook, which is understandable.
Would it be possible to extract from your apple script, only the part which takes the clipboard content → extracts only the first sentence → creates a new clip containing only that first sentence.
thanks very much !
just as an intellectual exercise.
is it feasible to convert selected text including images (or the clipboard)→ html file → open in a browser → take full advantage of the functionalities (filling in notebook, etc) and annotation capabilities of the evernote we clipper ?
thank you again
It may be feasible, but I don't see the ROI. Once the text/image is in an EN Note, you can easily use the Evernote tools for Notebook, Tags, annotation, etc. The Note is already opened and selected to it's ready for further changes if you need them.