Author Topic: How do you stop mouse movements / inputs when running a command?  (Read 1974 times)

dazzys

  • Newbie
  • *
  • Posts: 13
Hi All,

I've set up a small command which moves my mouse cursor to a specific location on the screen, right click, moves cursor again then presses left click. How do I prevent any mouse movements affecting this command whilst it's running?

Cheers
Daz

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: How do you stop mouse movements / inputs when running a command?
« Reply #1 on: June 09, 2019, 01:25:23 PM »
Hi, Daz - You'll want to look at the Other > Windows > Restrict Mouse Movement action

Your command will look like this:

Fully restrict mouse movement (set to 100%)
Move mouse somewhere
Click the mouse
Move mouse somewhere else
Click the mouse
Unrestrict mouse movement (set to 0%)


What this does is it stops the user from moving the mouse while it's doing its thing, and then releases the restriction.

Hope that helps!

dazzys

  • Newbie
  • *
  • Posts: 13
Re: How do you stop mouse movements / inputs when running a command?
« Reply #2 on: June 09, 2019, 01:51:36 PM »
Thank you very much for the reply. How do I set the 'Fully restrict mouse movement'? I can't seem to see that command anywhere? Also, When I run the command and despite definitely not touch my mouse, the cursor does not land where I originally set it?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How do you stop mouse movements / inputs when running a command?
« Reply #3 on: June 09, 2019, 02:28:16 PM »
Add the "Restrict Mouse Movement" action to your command by clicking the "Other >" button to the left of the action list, choosing "Windows" in the context menu, then choosing "Restrict Mouse Movement".

Drag the slider all the way to the right (100%) for "Fully restrict mouse movement", or all the way to the left (0%) for "Unrestrict mouse movement"


Absolute mouse positioning should work on the Windows desktop, however plenty of games either don't support it at all, or don't allow consistent placement.

dazzys

  • Newbie
  • *
  • Posts: 13
Re: How do you stop mouse movements / inputs when running a command?
« Reply #4 on: June 09, 2019, 02:42:00 PM »
Thanks for the reply. When you mention about plenty of games not allowing consistent placement, why don't they?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How do you stop mouse movements / inputs when running a command?
« Reply #5 on: June 09, 2019, 03:10:03 PM »
By "allow", I don't mean they're purposefully preventing it.

There are many reasons why a given input would not result in the exact same outcome (acceleration curves, processing delays, systems working against each other, etc...).

Games usually aren't designed with non-human input in mind, and mouse input is intended to be used with visual feedback (I.E. you move the cursor, observe the effect, then adjust your next movement according to the previous result), making it one of the least reliable methods of automation.
Generally speaking, if you can do something with keyboard input, that's the way to go. Don't get mouse input involved if you don't need to.