I personally have several notes in my Evernote notebook that serve as collection points for various text items. For instance, I have one note for quotes. I have another for ideas. Yet another for product development. And so on.
On my phone, I use an app called “Drafts” that allows me to enter text and then tell the app to append this text to one of these pre-defined notes. But on my Mac, I always had to do it manually - i.e. open Evernote, open the correct note, scroll to the bottom, and then type or paste my text.
This script now does it automatically:
- It prompts for the text and lets me select one of several possible target notes.
- It uses AppleScript to activate Evernote, open the correct note, and append the text at the bottom.
One problem I had when putting it together was identifying the correct note. Most of the examples I found on the web had Evernote search for the right note using its title. But as soon as you have more than one note that matches a search for that title, such a script will fail. The solution I’m using now is that the notes are addressed using the unique hyperlink that Evernote assigns to each note.
To get the hyperlink of a note in Evernote, right click the note in the notes’ list and select “Copy Note Link”.
There are two versions of a note link that Evernote uses:
If you paste the link somewhere outside of Evernote, the link will point to an http:// URL. If you paste it inside an Evernote note, however, it will start with evernote:///. It is this latter version of the link that you’ll need inside this script.
The evernote:/// link can be generated out of the http:// link by doing a regex search and replace:
The part of the script that you’ll need to customize is the action “Custom Floating HTML Prompt: Milligram Default”, and there the part after this line:
<select id="target" name="target">
Makes use of…
Evernote - Append Notes.kmmacros (15.3 KB)