Problem with variable in User Prompt

Hi, I am setting up a user prompt with a dropdown menu for several categories. I need one variable to be “_BEAU” and I want to simply display “BEAU” in the menu. However, after typing “|_BEAU__BEAU|” a small space is automatically displayed between the double underscore. I can input |_BEAD__BEAU| or several other letters in place of that U and the space between underscores disappears. Any thoughts on this?

From the KM Wiki Prompt For User Input

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 will the actual variable name that is set will be just as you entered it: “MyMacro__Text Message”

Thanks, I understand how to hide a variable prefix but perhaps this is a
bug. I believe I am entering text to properly hide the prefix, but when
the prefix is ‘_BEAU’ the double underscore between that and the suffix
display a slight space between them and it just didn’t work properly.

Post an image of your macro, because I'm confused.

You can't use the string "|_BEAU__BEAU|" by itself in a Prompt For User Input action - it doesn't make sense by itself.

And whatever else is being used is affecting what's going on.

Selecting BEAU sets the variable value to "_BEAU" as expected.

1 Like

Well strangely I opened up my macro to grab a pic of what was going on and
it wasn’t going on anymore. Terribly sorry, this was a false alarm. Next
time I have something strange like that I’ll know to grab a screenshot
right away.