jsampsonyyyyy Posted March 25, 2017 Report Share Posted March 25, 2017 I have a "mouse move" command in a macro. This is preceded by a "Get mouse position" and a delay. If I start the macro with a keyboard shortcut and then move the mouse manually, the mouse moves but not to the position I specified. Is there a way of preventing manual movement of the mouse sabotaging the macro in this way? If I have asked this before, I apologise. I cannot find the relevant post. Quote Link to comment Share on other sites More sharing options...
rberq Posted March 26, 2017 Report Share Posted March 26, 2017 Correct me if I am wrong, but I think you are saying (1) your macro gets mouse position, then (2) during the macro delay you move the mouse manually, then (3) the macro moves the mouse. If you coded step (3) to move the mouse "Relative to Last Position", that means "relative to wherever you manually moved it." If your intention is to ignore the manual movement, and move relative to the initial position, then you must calculate the position you want to move to; for example: Get Mouse Position [relative to] Screen: %N1%, %N2% Variable Modify Integer: %N1% = %N1% + 50 Variable Modify Integer: %N2% = %N2% + 80 Mouse Move [relative to] Screen %N1%, %N2% Quote Link to comment Share on other sites More sharing options...
terrypin Posted April 1, 2017 Report Share Posted April 1, 2017 I no longer use MX 3 so don't know if it has this command, but in MX Pro I think you could do what you want by using Lock Keyboard and Mouse and Unlock Keyboard and Mouse at appropriate places in you macro. The lock Keyboard and Mouse command is used to prevent the user from typing or moving the mouse during playback of a macro, so that the macro is not disrupted. Once the macro has completed, keyboard and mouse control are returned to the user. Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.