Button for restoring variables to default values in Input Prompt

I have a macro (Descriptors 1) which Prompts for User Input. It collects a dozen fields and builds a paragraph from the inputs. The variables are global, and they overwrite the default values in the input fields, which makes fine-tuning the output easier. This works great.

I also have a macro (Descriptors Reset) which functions to reset all the values in those global variables back to a set of default values. It quickly restores a known state.

I have been running this second macro from within KM as needed. What I would prefer is to put a "Reset" button in the Descriptors 1 prompt which runs Descriptors Reset. Ideally it would restart Descriptors 1 with the default values now restored. Failing that, it would quit with a message and allow the user to start Descriptors 1 with its trigger string.

I'm a new user of KM. Can anyone offer advice? Thanks in advance.

Hi and welcome to the forum. :wave:t3:

if i understand what you're after, it shouldn't be too hard. Upload your macro and I (someone else) can have a look.

Thanks! Here are the two macros:
Descriptors 1.kmmacros (17.0 KB)
Descriptors Reset.kmmacros (6.2 KB)

I have a "Reset" button, but currently it's nonfunctional.

The way I would approach this is to enclose the Prompt in an Until Loop, that will keep showing the Prompt until the "OK" button is clicked (or Return key is pressed).

Then, also in this loop I would have the reset Actions, which get run if the button clicked is "Reset".

Something like this:

Descriptors 1 v2.00.kmmacros (25.6 KB)

Click to Show Image of Macro

1 Like

That does just what I need. Thanks!