How to create a pick-list?

Ok, I tried this and thought I got it. But when I tried to execute the script, the disable function seemed to disable the entire Macro. What did I do wrong?

Sorry, I didn't get this one, either. I don't see that option. Right now it's set as "Display text in a window," but there aren't any option that approximate "Set Clipboard Action" in the dropdown. I've tried to find "Set Clipboard Action" when I click on "Insert Token," but don't see anything there, either.

I'm sure I'm overlooking something or am not quite grasping your instructions. Just let me know when you can and I'm sure I'll figure it out.

Thanks again!

Select the Action, and click on the Gear menu, then select "Disable"

Please explore the KM Actions (KM Wiki) list.

Ok, but when I do that it seems to disable the who script - not a portion of it.

I can only guess that you must be disabling the entire macro by mistake, as it's definitely possible to only disable individual actions. Here's a slightly modified version of @JMichaelTX's macro with the prompt and Display Text actions disabled and a final additional action using Set Clipboard to Text:

Select Multiple Items From List [Example] 1.0.1.kmmacros (15.4 KB)

You can either download and use that, or just reference the image as a guide for how the macro should look in order to achieve the results you want.

Thank you so much for sending this! Unfortunately, when I create a new trigger and / or click on Try at the bottom of the window, it doesn’t do anything.

I’m sorry if I’m missing something elementary. I’m trying my best to make this work, and thank you for all of your help. Truly.

BTW, I should add that when I click on Edit again, I see that the title of the Macro reads:

Select Multiple Items From List [Example] 1.0.1 (Disabled)

Not sure why…

No worries; we all start out in an elementary state :slightly_smiling_face:
You're far from the only one to be confused about what the "Try" button at the bottom of the editor does. Rather than execute the whole macro, the "Try" button only executes the currently selected action. The button to execute the entire macro is actually this one:

This is because Keyboard Maestro imports new macros in a disabled state by default, for security purposes. Both the macro group and the macro itself need to be enabled before the imported macro can be executed. Disabled macro groups and macros are shown in faded-out gray:

###Disabled Macro Group

###Disabled Macro

You can enable them by selecting the group or macro and clicking on the corresponding checkmark button at the bottom of the editor:

Once enabled, they should look like this:

###Enabled Macro Group

###Enabled Macro

You can also confirm whether a macro group or macro is enabled or disabled by the large X or √ in the top right corner of the Edit pane:

###Disabled Macro

###Enabled Macro

Once both the macro and its macro group have been enabled, the trigger you assign to the macro should work as expected, or you can use the "execute entire macro" button to try it without needing to set a trigger.

@token12 I'm afraid I just realized that the 1.0.1 version of the macro I uploaded earlier wouldn't work even if it was properly enabled because it needed some more slight tweaks to accommodate only using one list at a time. Here's a new version that I've confirmed works as intended:

Select Multiple Items From List [Example] 1.0.2.kmmacros (17.1 KB)

That worked! Thanks so much for all of your amazing help with this! It has already made my life far more easier…

Thanks again to both of you!

1 Like

Just one tiny question… It seems that whenever I trigger the Macro, the window always falls upon the app window I’m using.

Is there any way to free it so that it can appear elsewhere?

Thanks again!

Not using native AppleScript or JXA.
But you could do this using this excellent AppleScript Script Library by Shane Stanley:
Dialog Toolkit Plus v1.0.1 and Dialog Toolkit v2.0.3.

But that would require a major rewrite of the AppleScript.

You could also use Custom HTML Prompt action (KM Wiki), or MACRO: Spotlight Search Prompt by @DanThomas.

Thank you for these tips. Looks a bit more complicated than I expected - I think I can make do as is.

Quick question… Is there someway that I can use this Macro on my iPad? I saw there were a KM iPad app, but now understand that’s a kind of remote app.

Would appreciate any suggestions. Thanks!

I’m afraid there’s no way to use this macro as-is on iOS; as you’ve said, the existing KM iOS app is just a way of triggering macros on your mac from an iOS device, not for running them on one. As I understand it, your only option would be to recreate this macro, or at least an approximation of it, from scratch using Workflow, which is the closest thing iOS has to Keyboard Maestro (though not nearly close enough for my tastes).

It's been a while since I've used this pick list, but I'm not eager to do so. But I just upgraded to KB v. 9.0 and the pick list doesn't work.

Is there some revision I should make to the script to make it work?

Also, is there a way of creating disclosure triangles within pick list, so that I can create categories within it?


Which version are you using? I just tried the Prompt with List version and AppleScript version in KM9 and they worked fine for me. I recommend uploading the specific macro you're using so we can see where it might be going wrong for ourselves.

Thanks so much for your help! I'm attaching the Macro I've tried to use, per your request. Please let me know if I can provide you with anything else. And thank you very much again...

Select Multiple Items From List [Example] 1.0.2.kmmacros (17.4 KB)

Thank you. That made it easy to figure out what was wrong. For whatever reason, this version used an empty variable to set the list, so there was nothing for the rest of the macro to do:


To fix it, just erase the empty Local__List variable, enable the other one, and replace its contents with the list you want to pick from:


It worked! Thank you so much for your help with this -- I greatly appreciate it.

Two questions; one small, one big...

The small one: When you first helped me set up this Macro, I seem to recall that it pasted the selections from the pick list after I clicked on "Ok." That doesn't work today, and instead I have to just paste the selections into my application. Its there a way to just make the KB Macro past the selection when I click on "Ok"?

The big one: I raised this question before, long ago, and I'm desperately hoping there might be a solution... In short, I have a lot of hashtags in my pick list, and used to group them by categories, with headers IN CAPS. That helped provide definitions, but still required scrolling through a long window to find the right category set / value. That's why you and others suggested creating separate pick lists (i.e., one pick list per category), but it's not exactly quick and easy to to toggle through those lists. So...

Is there any way way to create a kind of system of disclosure triangles to group values within (or underneath) their respective categories? That would be...huge !

Thanks again for all of your help!

You may want to explore the Actions list in the KM Wiki.
For your use case, all you need to do is add a Paste action if the text is already on the Clipboard,
OR, use the Insert Text by Pasting action if you want to specify the variables, text, and even the formatting to be pasted.

1 Like

Thanks so much! And sorry for the late reply -- I had to suddenly do some traveling.

Yes, I keep going back and forth about whether it's best to manually paste v. have it automatically insert text after clicking on "OK." Don't know which one is best.

Any thoughts about if / how there's a way to create a kind of system of disclosure triangles to group values / categories? I'm desperately hoping there's a way to do this -- or figure out another organizational approach for organizing large sets of values within my pick lists!

Thanks again for your help...