Jump to content

An autocompletion helper for tags based on Applescript and KeyboardMaestro

Recommended Posts

There is now a new Version of this Keyboard Maestro Macro available. Here's the introductory blog post: Evernote Tag Autocomplete Macro Version 2

Evernote Autocomplete Macros - v2.kmmacros

This is basically a slightly more polished version of what is already available here: ("Evernote - ZKN - Tag Collection2.kmmacros", "Evernote - ZKN - Tag Selection2.kmmacros") and works just as is shown in the Gif below. The difference is that it uses Evernote's Applescript Interface to receive the tags (thanks @DTLow again to point this out to me).


This might be a little bit too nerdy for this forum, but I thought it might still be of interest: I created two [Keyboard Maestro](https://www.keyboardmaestro.com/main/) Macros, that can be used to have powerful type ahead/autocompletion search for tags.

What you'll need:

Now, if you press ⌃⌥⇧⌘# the tags for tags search will be updated. And if you press ⌥⇧⌘# the tag search will be displayed.

This is how it looks in action:


P. S.: For anyone who can read German here is a link to my blog with way more words about this: Keyboard Maestro Tag Autocomplete Makro für Evernote unter macOS

Evernote - ZKN - Tag Selection.kmmacros Evernote - ZKN - Tag Collection.kmmacros

Link to comment
  • Level 5*

I don't use keyboardMaestro but I'm an AppleScript fan

Not sure I need an autocomplete macro.
On my Mac, I start typing the tagname and it autocompletes with a dropdown list of matches


I do use a script for tag assignment because I prefer a drill down process that uses the tag hierarchy
Invoking the script displays all top level tags   1121074112_ScreenShot2020-02-09at10_25_07AM.png.ce1154687251786d83faa9bb906ea403.png 

Selecting a parent tag, drills down to the child level112236636_ScreenShot2020-02-09at10_29_22AM.png.f3e650005a6daea700c9a0710933a0e0.png

And continues recursively until the bottom level tag is selected

>>A note in Evernote which lists in an unordered list all your tags

AppleScript can retrieve the tags currently in use  -  set theTags to every tag

My script uses a note to identify note-type tags and define tag and processing requirements

Link to comment
On 2/9/2020 at 8:36 PM, DTLow said:

AppleScript can retrieve the tags currently in use  -  set theTags to every tag

Interesting. I tried this just now and it would work maybe even a little bit faster for the tag collector macro. The problem seems to be though, that the tags received like this are not normalized (for example my tags include Umlauts like "ä" which can be represented as a base character with an umlaut or as a pre composed character, see this for example), which means I'd need to normalize the results before I can match the tags, etc. But maybe I'll give it a try some day. Thanks for suggesting it!

I guess I overlooked this possibility earlier, because I manage my tags not only for Evernote, but have a tree of tags, which is used in my filesystem, in my gmail labels my task manager, etc. The tree looks something like this:


This system has many benefits, for example it's kinda easy to remember the path to a certain tag, by just remembering the numbers, which helps in tab completion in the shell.

But for Evernote's tag implementation  the system is too complex. For example: The mac client's native autocompletion is always starting with the first character. So I'd need to write at least "00-meta.01-setup.03-reading-writing" before the evernote tag "02-evernote" even shows up. Also context is important to my tags. For example a meta tag "00-meta" is used often in the tag tree. Which means that the tree can't be used without writing the full path into the tag, because Evernote assumes that every tag is unique by its name alone. But this in turn means that I can't read my tags in the tag view easily anymore because it'll only show the first 24 characters. So there are some limitations inherent in the way Evernote has implemented tags. And then there is also my wish to be somewhat "platform agnostic" - meaning it should be easy enough to move to a different system, if needed.

Most of my limitations and problems are solved by having a note which holds all of my tags in a readable and easily extendable format, like an unordered list. And since I have that list and since that list is also a reference for all my other contexts in which I need to put a thing into a taxonomy, I use this "single source of truth" for my Macro.

On 2/9/2020 at 8:36 PM, DTLow said:

I prefer a drill down process that uses the tag hierarchy

Drilling down is what I use, too - when creating the taxonomy, but not when tagging itself. Because when your tag tree becomes sufficiently complex, the possibility of multiple places where a certain tag could be in the tree rises too much to make a drill down process work. If I want to tag a note with the tag "evernote", I shouldn't need to think about where the tag is or even could be. What is interesting about this though: drilling down while tagging could be useful for the kind of "process tags" that your screenshot seem to suggest.

Edited by finnmatti
Changed the link about normalization
Link to comment
  • Level 5*
1 hour ago, finnmatti said:

If I want to tag a note with the tag "evernote", I shouldn't need to think about where the tag is or even could be.

Oops, I may be guilty of burying tags in the hierarchy

My top level tags are   ?Who, !What, @Where, .When

My evernote tag is  !Evernote   (I have to think about the ?!@. prefix)   
I also have a ?Vendor-Evernote tag in a vendor collection

In the tag hierarchy:   !What > !Reference > !Evernote   
most of my "what" tags are under !Reference

With the note-type list as a note, I have an additional option; direct access to tag !Evernote for various note types

Link to comment
26 minutes ago, DTLow said:

With the note-type list as a note, I have an additional option; direct access to tag !Evernote for various note types

This is interesting! This kind of idea might be useful if I could somehow get suggested tags when writing about a certain topic, or as you use with types of notes.

26 minutes ago, DTLow said:

most of my "what" tags are under !Reference

This makes me think that your hierarchy is probably mostly flat for reference-type tags, right? Because for me I have three tags right now that reference evernote in some form:

  • 00-meta.01-setup.03-reading-writing.00-notizen.02-evernote
  • 00-meta.01-setup.08-online.10-foren.02-evernoteforum
  • 01-dev.01-website.05-new.01-evernote-playground

So by this point drilling down becomes tedious.

P. S.: Let me say though that your system seems interesting, too and if it works for you, that's truly great. I already have had become inspired three times by your posts!

Link to comment

FYI: I updated the first message of this thread to reflect that there is now a new version of the Macro available which relies on the Applescript interface of Evernote to receive the tags, instead of a note you have to maintain manually.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...