How to create a pick-list?


I haven’t yet bought Keyboard Maestro – right now I’m trying to determine if it will be able to serve a particular function.

Here’s the deal… I’m using an app called Highlights for annotation, and segmenting all annotations for a given PDF doc. Highlights also allows users to apply tags through a @tag syntax. My tag folders are stored on the app DEVONthink Pro, however, and it’s tedious to type out the name of each @tag for various annotations (especially when an annotation can have multiple @tags).

So, I’ve been told that I need to create a “pick-list” that pops open with the @tag names (as well as their parent folders), so that I you can select the tags from the list for any given annotation. I was told that I could create macros that emulate pick-lists through Keyboard Maestro.

Is this true? And if so, is there any kind of template I could use to try this out?

Thanks very much!

Take a look at this thread. Looks like exactly what you need. HashTag Macro KM 7.0

This looks great. Thanks so much! A few questions…

-As I said, the syntax for the tags is @tags – so I’d have to replace #'s with @'s. In your script, under “Set variable,” you have “hashtags.” Should I change it to something else?

-As I mentioned in my original post, some of my tags have folders and subfolders (to reduce clutter and maintain order). Is there any way to create folders for the tags?

-Finally, while I like the display text, I’m wondering if there’s a way to tweak the script so that it just copies the tag names that were checked – instead of putting them into a the Display Text window. The set up you’ve created is fine. For me, it would just make my work process more efficient to copy them, instead of displaying them in a window, selecting all, copying them, and them pasting them in Highlights. Make sense?

Anyway, if you’ve got the time, I’d certainly appreciate any guidance to make these adjustments to your terrific script.

Thanks very much – again.

Yes. This is very easy.
You can disable or delete the Display Text Action, and replace it with:

to paste at the current location in your active document.


to put on the Clipboard, ready for you to manually paste anywhere you'd like.

You might find the below Actions helpful. They show the common Macro Actions to get info into and out of Keyboard Maestro.

The most common are:

  • Copy -- copies whatever you currently have selected in your current document
  • Set Variable to %CurrentClipboard% -- sets a KM variable to whatever TEXT is on your Clipboard
  • Paste -- pastes whatever you have put on the Clipboard in the KM macro to your current document
  • Insert Text by Pasting -- Pastes whatever text in the Action box to your current document

(click on links for more info)

###Actions to Get Info Into and Out of Keyboard Maestro

1 Like

Perfect! Thanks very much! I opted to use the Set Clipboard to Text option, and it works perfectly…

Is there any way to expandable / collapsible folders - in order to organize the tag checkboxes? I’ve got a lot of tags, and it would just take a long time to scroll through all of them if there’s no wait to segment them in folders. Any ideas / suggestion?

Thanks again…

The answer is yes, but it is not real easy. Or I should say that the degree of difficulty depends on your skill as a HTML/CSS/JavaScript coder. It is definitely possible to build the HTML prompt to use collapsable sections (“folders”).

You might take a look at this article:
How to Make a Collapsible List in HTML Without Java

Thanks so much for this. I fear this is a bit more complicated than I’m capable of doing… Sadly, I have no skills as a HTML/CSS/JavaScript coder. I did look at the article, and could copy and paste the code that they produced. But then what? I honestly don’t know where I’d insert it into the existing script to create those folders – without screwing everything up!

Nevertheless, I thank you very much for your help for this. I truly appreciate it.

By the way… Does anyone know if / how there’s a way to create something like this that would work on an iPad? I though the Keyboard Maestro app might work – but then I realized it’s just a means of triggering KB on the Mac via an iOS device! Ah well… Anyway, I’d welcome any ideas / suggestions on that front. Thanks!

No promises, but I might have something you could work with in the next day or so. I’ve found a very cool HTML framework that provides excellent collapse section support. I just need to finish working it into a live KM HTML Prompt.

If anyone is interested, see Bootstrap Collapse at

That would be…amazing… Thanks so much for your work on that - I greatly appreciate it!

BTW, do you know if there’s way to create something like this “pick list” macro that would work on an iPad? Thanks!

1 Like

No I don’t. As you know the iPad iOS is much more restrictive than the Mac OS X. How do you want to use the picklist on the iPad? What apps?

One idea just came up: TextExpander

It is available for both Mac and iOS, and has a pick-list feature. But I don’t know for sure if it will work on the iPad, or more specifically, in the iPad app of interest.

As best as I can tell, not all iOS apps support the TextExpander picklist (fill-in popups) feature.

If you want automation in the iPad I think you should look into the 2 programs below.
Unfortunately I am no expert in these programs and I do not think they have as good a forum as this.

Workflow: Powerful Automation Made Simple

Launch Center Pro - Shortcut launcher and Today widget

Here is another solution for collapsable sections, done with pure CSS:
Pure Css3 Expand/Collapse | CSSDeck

Looks like this:

You can click on each of the grey boxes with "Level ..." to expand/collapse. Very cool.

1 Like

Here's a teaser/demo using this framework:

I’m very sorry for failing to respond - somehow I missed this.

What you’ve posted looks great! How can I appropriate it into my macro? Thanks so much again - I really do appreciate it…

Glad you like it.

Unfortunately I've not had time to take this beyond the demo phase, and it likely to be a week or so before I do.
If you want to dive into the HTML/CSS world, the above frameworks really make it fairly easy.

Here is what I have so far -- it is very rough. I used it for proof of concept demo. You are welcomed to it if you think it will be of any help.

It is based in large part on the macro written by @iNik

MACRO: HTML Prompt with Collapsable Checkboxes [TEST]

HTML Prompt with Collapsable Checkboxes [TEST].kmmacros (9.8 KB)

1 Like

This looks great! Just wondering… Where within the script would I change the Group names? And how (and where) would I change the check box names?

BTW, right now, there’s just one check box (CB#1), and the old checkboxes from the last version of the script (#foo , #bar , #baz).

I’m happy to make the changes on my own, but I just don’t want to do anything that will disrupt the script. Like I said, I’m just using the checkbox to copy the checkbox names (and I’m also changes the #'s to @'s).

Thanks so much again for your help!

Right now they are in the HTML code – hard coded.
The finished script would allow the user to set them in KM Variables.

Gotcha. Thanks for the explanation. Look forward to seeing the finished script - whenever you’re able to complete it! Thanks again for your help…