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

Re: freeze keyboard and mouse during tests?

Expand Messages
  • Philip Zembrod
    ... UltraVNC offers such a feature: If your remote control a PC, there is a button in the ultraVNC client s tool bar which shuts off the real keyboard and
    Message 1 of 5 , Mar 1, 2007
      > Re: freeze keyboard and mouse during tests?
      > Posted by: "brentje" brentje@...   brentje
      > Thu Feb 22, 2007 9:32 am (PST)
      > 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.

      UltraVNC offers such a feature: If your remote control a PC, there is a button
      in the ultraVNC client's tool bar which shuts off the real keyboard and mouse
      on the PC you are controlling. UltraVNC is open source, so maybe one can
      learn how they do it and implement it for Win32::GuiTest.

      The project homepage is http://www.uvnc.com/

      Cheers
      Philip
    • brentje
      Now I ve been thinking about this so much I had to experiment. Found this on my travels.
      Message 2 of 5 , Mar 8, 2007
        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 3 of 5 , Mar 8, 2007
          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.