WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: edmoran on February 10, 2015, 09:29:29 AM

Title: Disable mouse and keyboard while Winbatch does mouse movements and clicks
Post by: edmoran on February 10, 2015, 09:29:29 AM
I want to disable the users keyboard and mouse while my program does multiple mouse movements, mouse clicks, and sendkeys.  What is the best way to accomplish that?

Ed Moran
Title: Re: Disable mouse and keyboard while Winbatch does mouse movements and clicks
Post by: JTaylor on February 10, 2015, 10:21:38 AM
IgnoreInput()?


Jim
Title: Re: Disable mouse and keyboard while Winbatch does mouse movements and clicks
Post by: td on February 10, 2015, 12:59:57 PM
If you use IgnoreInput to disable input, the SendKey* and MouseMove functions temporarily re-enable input while they are performer their respective task and disable it again when they are done.
Title: Re: Disable mouse and keyboard while Winbatch does mouse movements and clicks
Post by: td on February 11, 2015, 08:30:21 AM
In the above reply I inadvertently used the term 'EnableInput' instead of 'IgnoreInput' when referring to the WinBatch function that temporarily blocks UI input.  I have since corrected the post and apologize for any confusion the typo may have caused.

Note that user input is automagically enabled when a blocking WinBatch script terminates, if the blocking script does not called 'IngoreInput(@false)'.  It will also be re-enable when blocked, if a user presses the CTRL+ALT+DEL key sequence.