Re: freeze keyboard and mouse during tests?
- Now I've been thinking about this so much I had to experiment. Found
this on my travels.
I'm working on something for myself. If I figure it out I'll let the
group know, but this seems to be a good place to start.
--- In email@example.com, "brentje" <brentje@...> wrote:
> I believe there is a way to do this. I was looking it up at one time,
> but didn't get the chance to test anything. You'll have to look at
> the Win32::API and SetWindowsHookEx. You can set a hook to grab all
> messages and block any you don't want, like keyboard and mouse
> commands. This would actually be a really nice feature to add if
> someone can figure it out.
> --- In firstname.lastname@example.org, "evenprime" <evenprime@> wrote:
> > Is their any way to freeze the keyboard and mouse during automation?
> > I actually use GUI-test to automate gui-only configurations settings
> > now and then, and users tend to sabotage things pretty dandily.
> > But I imagine many a test has been sabotaged by accidental knocking of
> > the mouse or keyboard or even natural mouse-float in LED mice :^)
> > Ideas?
- Cool...found something that works.
Seems to work well. And works with the MoveMouse function at least,
so it should work with SendKeys too. I'm going to do more research to
see if I can ignore all input except for a certain key-combination
(pause/stop a script without actually breaking the script).