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

Wow~
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