Repeat until mouse-click?

Is there a way to repeat a macro action until a specific condition (user action) is met? For instance, and as a very basic example: Keep beeping every 2 seconds until the user clicks the mouse button.

All I’m finding is a repeat action that wants a finite number of repeats entered, and I haven’t been able to come up with a way to capture a random user click.

I’m not sure about waiting specifically for a mouse click, but check out the “while” and “until” actions. I think they’re what you have in mind.

Like I said, they may not specifically support a mouse click, but they support a lot of conditions.

2 Likes

“Until” is what I was looking for – and “while” may be even better. Unfortunately, I searched for “repeat until” and wasn’t finding it.

Any ideas on how I might capture the mouse state in a variable???

I don’t, but maybe someone else will. Maybe you should un-check the solution, so people know there’s still a question.

See MOUSEBUTTON() function.

1 Like