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

Re: SendKeys/PushButton not working!!!

Expand Messages
  • Piotr Kaluski
    It works for me on XP, perl 5.8.7. What do you mean saying that button pushes were not accept? --Piotr ... accept,
    Message 1 of 3 , Dec 14, 2005
      It works for me on XP, perl 5.8.7.
      What do you mean saying that button pushes were not accept?
      --Piotr



      --- In perlguitest@yahoogroups.com, "elinamelamed"
      <elinamelamed@y...> wrote:
      >
      > Hi All,
      > I've installed the latest Perl version from Active perl on my XP,
      > and tried to work with Win32::GuiTest. When I saw that complicated
      > code I tried to run not working, I tried the run the simplest code
      > that I took from Piotr Kaluski's documentation:
      >
      > use Win32::GuiTest qw( FindWindowLike
      > PushChildButton );
      > use strict;
      >
      > my @whnds = FindWindowLike( undef, "^Calculator" );
      > if( !@whnds ){
      > die "Cannot find window with title/caption Calculator\n";
      > }else{
      > printf( "Window handle of calculator application is %x\n",
      > $whnds[ 0 ] );
      > }
      > PushChildButton( $whnds[ 0 ], 126 ); # Button 2
      > PushChildButton( $whnds[ 0 ], 92 ); # Button +
      > PushChildButton( $whnds[ 0 ], 129 ); # Button 5
      > PushChildButton( $whnds[ 0 ], 112 ); # Button =
      >
      >
      > And it didn't work!
      > The window handle was found, but the buttons pushes were not
      accept,
      > same for SendKey and PushButton.
      > I really don't know what could be the problem.
      > Please help,
      > Elina
      >
    • elinamelamed
      Hi, I forgot to mention that I installed GuiTest from CPAN, build Win32- GuiTest-1.50.3-ad. The perl version I m using is also 5.8.7 . The strange thing is
      Message 2 of 3 , Dec 18, 2005
        Hi,
        I forgot to mention that I installed GuiTest from CPAN, build Win32-
        GuiTest-1.50.3-ad. The perl version I'm using is also 5.8.7 . The
        strange thing is that shortly after installing the module,
        everything works fine, but after a few hours the SendKeys function
        doesn't send keystrokes as expected. I'm trying to send user and
        password to HTTP authentication message (but same happens with the
        calculator example), and the only key that I see is being sent is
        {TAB}. If I reinstall the module, it works fine. I know that it
        sounds like fiction, but I really don't know what to do...

        Thanks in advance,
        Elina
        --- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@p...>
        wrote:
        >
        > It works for me on XP, perl 5.8.7.
        > What do you mean saying that button pushes were not accept?
        > --Piotr
        >
        >
        >
        > --- In perlguitest@yahoogroups.com, "elinamelamed"
        > <elinamelamed@y...> wrote:
        > >
        > > Hi All,
        > > I've installed the latest Perl version from Active perl on my
        XP,
        > > and tried to work with Win32::GuiTest. When I saw that
        complicated
        > > code I tried to run not working, I tried the run the simplest
        code
        > > that I took from Piotr Kaluski's documentation:
        > >
        > > use Win32::GuiTest qw( FindWindowLike
        > > PushChildButton );
        > > use strict;
        > >
        > > my @whnds = FindWindowLike( undef, "^Calculator" );
        > > if( !@whnds ){
        > > die "Cannot find window with title/caption Calculator\n";
        > > }else{
        > > printf( "Window handle of calculator application is %
        x\n",
        > > $whnds[ 0 ] );
        > > }
        > > PushChildButton( $whnds[ 0 ], 126 ); # Button 2
        > > PushChildButton( $whnds[ 0 ], 92 ); # Button +
        > > PushChildButton( $whnds[ 0 ], 129 ); # Button 5
        > > PushChildButton( $whnds[ 0 ], 112 ); # Button =
        > >
        > >
        > > And it didn't work!
        > > The window handle was found, but the buttons pushes were not
        > accept,
        > > same for SendKey and PushButton.
        > > I really don't know what could be the problem.
        > > Please help,
        > > Elina
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.