Jump to content
Macro Express Forums

Catching a mouse before "mouse move"


Recommended Posts

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.

Link to comment
Share on other sites

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%

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...