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

Re: [perlguitest] Handle to a button

Expand Messages
  • Girish
    Kiran, ... my @MainWin = FindWindowLike(undef, ^Windowname* , ); # Note: U can mention first few characters from the title of the window if (not @MainWin) {
    Message 1 of 4 , Jul 26, 2006
    View Source
    • 0 Attachment
      Kiran,

      Try below:
      -----------------------------------------------------------------------------------------------------------------
      my @MainWin = FindWindowLike(undef, "^Windowname*", "");
      # Note: U can mention first few characters from the title of the window

      if (not @MainWin) {
      die "Could not find the window \n"
      } else {
      print FILEHANDLE ("Window handle is ", $MainWin[0], "\n" );
      }

      my @wnds = GetChildWindows($MainWin[0]);
      sleep(1);
      print "@wnds \n";
      sleep(1);

      foreach my $WinHanlde (@wnds) {
      my $winname = GetWindowText($WinHanlde);
      my $classname = GetClassName($WinHanlde);

      print "$WinHanlde --> $winname --> $classname \n";
      }
      -----------------------------------------------------------------------------------------------------------------


      U can find out your button handle from above based on the classname

      All the best

      On 7/26/06, Kiran Rajan <kiran_rajan@...> wrote:
      >
      > Hi all,
      >
      > I am newbie to win32guitest.Can anybody tell me how to get
      > the handle to a button in a window.The button has no text in it
      >
      > Thanks & regards
      >
      > Kiran Rajan
      >
      >
      >
      > **************** CAUTION - Disclaimer *****************
      > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
      > ***INFOSYS******** End of Disclaimer ********INFOSYS***
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >


      --
      Rgds,
      Girish :-)
    Your message has been successfully submitted and would be delivered to recipients shortly.