Loading ...
Sorry, an error occurred while loading the content.

Re: freeze keyboard and mouse during tests?

Expand Messages
  • brentje
    Now I ve been thinking about this so much I had to experiment. Found this on my travels.
    Message 1 of 5 , Mar 8 9:07 AM
    • 0 Attachment
      Now I've been thinking about this so much I had to experiment. Found
      this on my travels.

      http://aspn.activestate.com/ASPN/Mail/Message/perl-win32-users/3168801

      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 perlguitest@yahoogroups.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 perlguitest@yahoogroups.com, "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?
      > >
      >
    • brentje
      Cool...found something that works. http://www.see.ed.ac.uk/~mrichar1/perl/scripts/blockinput.pl Found here: http://www.see.ed.ac.uk/~mrichar1/perl/ Seems to
      Message 2 of 5 , Mar 8 11:28 AM
      • 0 Attachment
        Cool...found something that works.

        http://www.see.ed.ac.uk/~mrichar1/perl/scripts/blockinput.pl

        Found here:

        http://www.see.ed.ac.uk/~mrichar1/perl/


        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).
      Your message has been successfully submitted and would be delivered to recipients shortly.