What is the quickest way to pause before an if then else action?

I wrote a macro which works fine to take a screenshot with an image annotation app called XNIP and then transfers the image to my snagit library.

It's irrelevant if you don't know XNIP. My question concerns only keypress user input.

At the end of the macro, I want to ask the user if the image should be resized (reduce size by 50%) (independently I tested the resize action multiple times and it works. This is because one drawback of XNIP is that image can be too large.

I wrote an if then else action at the end of the macro: if press "R" resize image. Otherwise do nothing.

To ask for user input, I used the following 2 actions. It works but definitely not elegant.

Would someone have a suggestion for a more elegant keypress based input. I really want something fast like waiting for a keypress, not clicking on a button,

thanks in advance for your time and help

XNIP → Snagit → Ask if want to Resize ↓ 50%.kmmacros (33.6 KB)

If you want user input, why not "Prompt for user input"?

1 Like

great solution. thanks very much. I have been working all day on macros. I think that my brain is starting to sizzle.

1 Like

I would have liked to use keypress and avoid buttons, but that does not seem possible ?
IMO Buttons really slow down the workflow.

In the Field where you give the button its name put "Resize/R" instead of "Resize".

Then hitting the "R" key works to press the button.

Also, the way it is set up in @Nige_S's example Macro with "Resize/" hitting the return key will press the button.

So, you can do all with the keyboard and don't have to click any buttons with the mouse.

1 Like

great. thank you

As @Zabobon says, that's the joy of using "standard" UI features -- they come with the usual "Return key presses the default button, Esc presses Cancel", etc, plus you can set (some of) your own options. See the Wiki for more.

1 Like