Prompt for User Input Macro (v10.2)

I'm trying to make a User Prompt with different check boxes (one Kitchen, one for Living Room, etc.). And I want it to simply type "-kitchen" if the Kitchen checkbox is selected, OR type "-living room" if the Living Room check box is selected. I can't figure out though how to make each check box result in an action.

This is going to be part of a much bigger action, but I'm lost on how to setup the User Prompt. I read through the manual on User Prompt, but I'm not understanding how to turn prompts into results. Any help would be much appreciated.

Prompt for User Input.kmmacros (3.3 KB)

Keyboard Maestro Export

If i follow what you mean, 2 simple if/else actions should do the trick:
image

I'm glad to be on the right track! I found a YouTube video that covered User Input and found one section of the video to show my error. I was using "contains" instead of "is" for each variable.

And from there, I set it up exactly as you did. I'm kind of shocked.

Thank you very much for your solution.

As an aside, is there a way to assign a keyboard shortcut to each checkbox, like you can do for buttons? For instance, I would like to hit the "L" key for Living Room, "K" for Kitchen, etc.

You're welcome. As per the Wiki Only buttons have assignable shortcut keys in the Prompt for User Input Action.

So if you wanted to use keyboard shortcuts to navigate the prompt in this way, you could instead create a multi-button prompt, and use the %PromptButton% token to determine the following actions based on the button pressed.

You can also use spacebar to check/uncheck boxes and tab between them.

I've tried about 10 different ways to get this working, but at the end of the day, don't know the syntax required to get %ButtonPrompt% to create a result. Could you help me with this?

I need the macro to "insert text by typing" when the corresponding button is pressed (or shortcut key is typed). I've tried using %ButtonPrompt% about every way and in every field I can think of. Just not the right way. :stuck_out_tongue:

Screenshot 2023-07-13 at 8.23.15 AM

Sorry, I should have been more specific. Each button needs to specify the text that is typed.

Screenshot 2023-07-13 at 8.41.33 AM

I'm guessing this is what you want. They are all variables. In your example, you are using them the wrong way.

You should read the wiki that @Evan_Mangiamele pointed you to so you can understand. Also,
read the Variables wiki.

That should help.

KC

2 Likes

Success! This is exactly what I was looking for. I never would have guessed to set it up like that, and very cool to learn something new.

Thank you very much, KC.

1 Like

You are very welcome @Bret!