“Prompt for User Input” Dubble Underscore Results

“Prompt for User Input” Dubble Underscore Results

I'm having trouble getting the desired prompt window, to display what I'd like, and not what the variable's name is.

For example, all my variables starts with "Var" followed by the appropriate title eg. VarTest.
I don't want "VarTest" to be shown as the option, I would like something else to be shown, like "A", but it still need to write the input result to "VarTest".

According to the wiki, this should be done by adding the Name followed by a double underscore.
https://wiki.keyboardmaestro.com/action/Prompt_for_User_Input?s[]=prompt&s[]=user

In this test macro, i've put down 3 scenarios how one can put the double underscore before or after the variable, plus the normal way.

The first one displays what I wanted, but it does not write the value to the variable, and the double underscore is inserted afterwards [VarTest__A]
The second one is done according to the wiki before the variable, but does not replace the display of the variable.[A__VarTest]
The third one (normal one), is the only one that allows it to write to the variable.[VarTest]

If you run this test macro, be sure to insert only the value in one of these 3 inputs to see what i mean with the results displayed.

I'm probably missing something really simple here, but this breaks my brain. hehe

Thanks!

Prompt for User Input.kmactions (1.1 KB)

If I understand you correctly, that is not possible for showing the Variable Name in the Prompt for User Input action.

If you have a KM Variable named "Prefix__RootName" used in the Prompt, then it will appear as "RootName".

image

image

The results are put into the KM Variable "Prefix__RootName".

Using your variable names, you could use "VarTest__A" and only "A" would be shown, but the results still go into the name "VarTest__A"

If you want to only show AND use "A", then why not just name the variable "A"?

Thanks. The reason for the naming method is because there's about 60macro's that form part of the same "master macro", and it gets confusing to troubleshoot if my variables have generic names such as Time, which can get easily confused by the action TIME() for example. So starting all my variables with "var" makes it easier for me.

I just thought since it hides the name when putting the double underscore after the variable name, it still writes it to that original variable, but it makes sense that it creates a new variable name, so thanks that helps.