Prompt user for a variable name and display its value


I would like to create a macro that prompts the user to input an existing variable name and the macro will display its value.

Hoping someone could point out what I'm doing wrong with my macro.

Display Text.kmactions (1.2 KB)

Variable test


Hello @ChrisQ

Since I am currently not in front of any of my Macs and not at home I can only guess - but what I see is that everything looks just fine - despite you doesn’t want to display the unprocessed Token for your Variable above it.

For the escaping thing - if I remember it correctly you could probably delete the backslash character and it will work as like it does already.

If you still have questions- don’t hesitate to ask

Greetings from Germany


Hi Tobias,

Thanks for the quick response. I removed the backslash "" but still got the same result.

Have you seen this

I am sorry if I am sounding strange but without any information about what you’re trying to accomplish we all can only guess …

If I am right and you don’t want the token to be displayed you can delete the whole line … otherwise I already told you that everything looks absolutely fine for me.

Greetings from Germany


Hi, @ChrisQ. How about this?

Download: Display the Value of a Macro Variable.kmmacros (5.2 KB)


  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 13.4.1 (22F770820d)
  • Keyboard Maestro v10.2

1 Like

Hi Jim,

From your macro, I was able to see the "secret sauce", which was this action:

I'm able to get my macro working now.
Variable test2

Thank you so much :slight_smile:

1 Like