Checkbox: A Distinct Name Instead of Having to Use it as Variable Name?

For checkbox, is it possible to define another name for display other than the variable name?

I want to use Local variables as possible. But the checkbox does not look nice and intuitive if it always has a "Local" prefixed to it.

In the following screenshot, I would like the window to show Send to Section, Send to Class, Post Date, instead of Local_sendToSection, Local_sendToClass, Local_postDate.

Actually I have another question for checkbox (not sure if it worth opening a new post): Is it possible to make only one checkbox checked? For instance, if I check Local_sendToSection, then Local_sendToClass will be automatically unchecked.

Edit: I’m aware that a dropdown menu can accomplish this goal. But the disadvantage of a dropdown menu is that I have to click it to see all available actions, and it takes another click to choose an item other than the default one.



No problem, just put TWO underscores between "Local" and the rest of the name.

1 Like

That's called a Radio Button Group. See Input Type="Radio for the code.

1 Like

Thanks, @mrpasini.
Now I can see on the wiki page:

“Text Area” and “Radio Buttons” are not supported

1 Like

Unfortunately you will have to use the Custom HTML Prompt action for this.

1 Like

Thanks, @JMichaelTX. That's brilliant! I'm very impressed!

I saw some people use two underscores after "Local". I did not know they have this magic effect!
Did a search and found that you have virtually answered my question in another post.

And the wiki page has actually explained it clearly. Can't believe that I have missed it! Learned something today:

How to Hide a Variable Prefix in the Prompt

It is a good idea to have a common prefix in all of the variables used by the same macro. This clearly identifies the macro that uses these variables, and groups them together in the Variables section of the Keyboard Maestro Preferences. But you may not want to expose this prefix to the user running the macro.

So, you can hide the prefix if the variable name starts with a prefix followed by two underscores . Then the label will show only the latter part of the variable name.

For example, if you enter “ MyMacro__Text Message ” in the variable name field of the Prompt for User Input action:

  • It will display a label of “ Text Message ”:

  • But the actual variable name that is set will be just as you entered it: “ MyMacro__Text Message

1 Like

Thanks. Looks like it is the only option if I have many items to choose one from.

For now, since I have only two options to choose one from, the "Result Button" variable has served my need:

Set up:


As JMichaelTX points out, you can use them linked to Keyboard Maestro variables with a Custom HTML Prompt.

1 Like