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

Handle to a button

Expand Messages
  • Kiran Rajan
    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
    Message 1 of 4 , Jul 26, 2006
    • 0 Attachment
      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]
    • Santosh Kumar
      Kiran, If you have a Parent window handle, You can try using, @hwnds = GetChildWindows( $hwnd ); This will return all the child of the Parent window. Obviously
      Message 2 of 4 , Jul 26, 2006
      • 0 Attachment
        Kiran,
        If you have a Parent window handle, You can try using,
        @hwnds = GetChildWindows( $hwnd );

        This will return all the child of the Parent window.
        Obviously your button too if its a part of a parent window.

        Thanks,
        ~Santosh kumar

        ----- Original Message -----
        From: Kiran Rajan
        To: perlguitest@yahoogroups.com
        Sent: Wednesday, July 26, 2006 3:47 PM
        Subject: [perlguitest] Handle to a button



        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]





        [Non-text portions of this message have been removed]
      • Alex Morozov
        ... Hi. If a button doesn`t have a text, you should determine its classname and index. I use AutoInfo from AutoIt. Then, pass the classname to the FindWindow()
        Message 3 of 4 , Jul 26, 2006
        • 0 Attachment
          >
          > 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
          >
          Hi.

          If a button doesn`t have a text, you should determine its classname and
          index. I use AutoInfo from AutoIt.
          Then, pass the classname to the FindWindow() and pick a certain button
          from the returned array by its index.

          Maybe, there is a more simple approach? Anyone?
        • Girish
          Kiran, ... my @MainWin = FindWindowLike(undef, ^Windowname* , ); # Note: U can mention first few characters from the title of the window if (not @MainWin) {
          Message 4 of 4 , Jul 26, 2006
          • 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.