I'm looking for a way to automate creating the automation. I have a big master list of tags that I use for almost everything. Projects, people, actions, and plain old tags. Instead of having a list taped to the monitor, I'd like to convert this into some KM palettes fired off from my Stream Deck, where I'm presented with a list of tags and the selected item is used to Insert Text by Typing. Both the macro name and the Insert Text by Typing are the name of the tag.
I've started manually creating the macros and it's doable, but tedious. And it's something that needs to be done every time I add a new tag. I feel like I need a macro to parse the text file and fill the palette on the fly. Does that sound like something that is possible? Where do I start with that concept?
And in the answering your own question category, I just discovered the Prompt with List action. This is perfect!
On execution, the macro takes my master tag list from the text file, and uses it to populate the list. It then saves the selected tag to a named clipboard and pastes that named clipboard at the current insertion point. That all works and was really fast to create once I found the correct action to use.
This afternoon, I will set it up on the Stream Deck with a few pre-poplulated searches for people, projects, status, and plain old tag. Each of the tags utilizes a prefix to categorize it, so a project is #prjProject_Name. My initial search string for the project list is the #prj. The list is then already filtered to just projects.
Also, I'm very impressed that the search feature works throughout the string and not just from the beginning of a word.
Another bonus feature is that I can paste these tags anywhere. Whether that's in my YAML front matter to a Markdown note, or an Outlook category, which needs to be created in Outlook, but is easy if tedious using this macro.
Potential next macro project: Take that same list of tags and convert it to Outlook categories, but only add categories that aren't already in Outlook. I suspect this one will need VBA to work.
I don’t know how useful/relevant this might be to you but I found My Hashtag Workflow via Keyboard Maestro in the MarginNote forum while I was looking for ways to apply KM to MarginNote, but you should take a look as you may be able to adapt it to your needs.
It is better to use KM Variables instead of a Named Clipboard, unless you need to store rich text, images, or objects.
I'd suggest saving the selected tag to a KM Variable "Local__Tag", and then use a Insert Text by Pasting action using that Variable.
I waffled between the two methods. I can switch over and add a call to the variable cleanup macro. I just figured this way was one less step; although, now that I think on it more, I suppose it leaves a clipboard hanging out there unless I clean it up. I'm guessing that's one of the reasons to use a variable instead.
I'm really liking Prompt With List for generating a psuedo-palette. However, one thing that something like a Conflict Palette does that I don't seem to be able to get Prompt With List to do is automatically select when it's down to a single choice. Right now, it seems I either have to click on the item with the mouse or press the Return key.
Is there any way to get Prompt With List to automatically continue when the choice has been narrowed down to a single item?