How to temporary freeze mouse during macro execution?

reason being during that 100-200ms keyboard macro execution
sometimes I'd move the mouse instinctively
n it'll mess up the macro a tiny bit sometimes
considering it's mostly Mouse Click actions...

basically only macro controls mouse movement during the macro execution
n not actual mouse hand movement...

The mouse works at a very low level, so there's not (as far as I know) a simple way to temporarily disable it. In theory, you might be able to do something with alternative pointer control methods in the Accessibility section of System Settings, but it'd be pretty ugly (if it even worked).

If I were implementing this myself, I'd probably just put an alert onscreen for a second or so that said "remove hand from mouse, macro about to run!" to remind myself to free the mouse. It's low tech, for sure, but incredibly simple to implement.

-rob.

With a quick search in this great forum: lock-mouse-while-macro

-Neo

1 Like

Is it a bluetooth wireless mouse or a wired USB mouse? The solution may depend on your answer.

wired USB mouse

That's too bad, because that might have made the problem easy.

I have the same problem as you, but I solve it a different way. Instead of disabling the mouse, my macros check if the user has moved the mouse in the last second, and if so, my macro waits until the mouse is idle.

The simplest way to do this would be to place this before each Move/Click Mouse action:

The "tink" sound would be to remind you that the macro is on hold until you stop moving the mouse. Sometimes I replace the "think" sound with a spoken action like this:

Another approach I've used is this: