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

Re: [perlguitest] Re: To capture the text of the error window

Expand Messages
  • Nahum Cohen
    You are right .. Now it s working fine, thanks.
    Message 1 of 6 , May 13, 2005
    • 0 Attachment
      You are right ..
      Now it's working fine, thanks.


      On 5/13/05, pkaluski <pkaluski@...> wrote:
      > Did you take into account that WinSpy displays in hex and perl in decimal?
      > -Piotr
      >
      > --- In perlguitest@yahoogroups.com, Nahum Cohen <nahum.cohen@g...> wrote:
      > > Hi,
      > >
      > > The example works for me just fine.
      > > One question: how did you obtain the control id of the label using
      > WinSpy++ ?
      > > When I highlight this text field in WinSpy++ I got properties like
      > > handle, class, control ID and more, but non of them was 13568 like in
      > > the example.
      > >
      > > How do I get this magic number ?
      > >
      > >
      > >
      > > On 5/10/05, Dennis K. Paulsen <ctrondlpaulsden@y...> wrote:
      > > >
      > > > Here is one rough example:
      > > >
      > > > use Win32::GuiTest qw(:ALL);
      > > > # Get handle of parent window
      > > > my ($pWin) = FindWindowLike(0, 'Calculator');
      > > > # Get handle of dialog window (alert window)
      > > > my ($cWin) = FindWindowLike($pWin, 'About Calculator');
      > > > # Get handle of label that contains the pertinent text. 13568
      > > > # is the control id of the label for this application. It is
      > > > recommended that you use WinSpy++ or Spy++ to obtain this handle.
      > > > Alternatively if you know you only have one static label you can
      > > > exclude this parameter from the function.
      > > > my ($sLabel) = FindWindowLike($cWin, undef, 'Static', 13568);
      > > > # Obtain text from label control
      > > > my $txt = GetWindowText($sLabel);
      > > > # Output it to the screen
      > > > print "Label Text: $txt\n";
      > > >
      > > > Regards,
      > > > D
      > > >
      > > > --- In perlguitest@yahoogroups.com, "vishal_kharge"
      > > > <vishal_kharge@y...> wrote:
      > > > > Hello All:
      > > > >
      > > > > I need to capture the text of the allert/error window, not the
      > > > title.
      > > > >
      > > > > Which function I should use, can you write the simple code for it.
      > > > >
      > > > > Thanks,
      > > > > Vishal Kharge
      > > >
      > > > Yahoo! Groups Links
      > > >
      > > >
      > > >
      > > >
      > > >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.