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

Re: Bug? IsGrayedButton always returns FALSE

Expand Messages
  • Tim Mitchell
    Thanks Dennis, I think you are right. I was using http://www.piotrkaluski.com/files/winguitest/docs/index.html as a guide to the GuiTest functions. Maybe Pior
    Message 1 of 6 , Jun 3, 2006
    • 0 Attachment
      Thanks Dennis,

      I think you are right. I was using
      http://www.piotrkaluski.com/files/winguitest/docs/index.html as a
      guide to the GuiTest functions. Maybe Pior will update his
      documentation if many other people are as confused as me. It seems odd
      that I should have to consult MSDN C++ documentation to find out how
      to use Perl-based GuiTest. Maybe this function should be named
      IsRB_CheckboxGrayed

      Yim Mitchell
      --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
      <ctrondlpaulsden@...> wrote:
      >
      > Hello,
      > If this is a regular button, it is either enabled or disabled, see
      > IsWindowEnabled. IsGrayedButtton is for radio buttons or checkboxes,
      > per Microsoft documentation. See thread
      > http://groups.yahoo.com/group/perlguitest/message/619 for more
      > information.
      >
      > Regards,
      > Dennis K. Paulsen
      > --- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@> wrote:
      > >
      > > Has anyone else had this problem?
      > >
      > > Try this function. $Title is the string title of a window with the
      > > button to test. $ButtonToCheck is the string caption on the button.
      > >
      > > sub VerifyButtonDisabled {
      > > my $Title = shift;
      > > my $ButtonToCheck = shift;
      > > my @WinHandle = FindWindowLike(undef, $Title);
      > > print("WinHandle = $WinHandle[0]\n"); # diagnostic
      > > my @ButtonHandle = FindWindowLike($WinHandle[0],$ButtonToCheck);
      > > print("ButtonHandle = $ButtonHandle[0]\n"); # diagnostic
      > > my $ButtonState = IsGrayedButton($ButtonHandle[0]);
      > > print("ButtonState = $ButtonState\n"); # diagnostic
      > > if (IsGrayedButton($ButtonHandle[0])) {
      > > print(" PASS: $ButtonToCheck button is disabled.\n");
      > > } else {
      > > print(" FAIL: $ButtonToCheck button is enabled.\n");
      > > }
      > > }
      > >
      > > When I use it on buttons that are either enabled or disabled I get
      > > this same result:
      > > FAIL: OK button is enabled.
      > >
      >
    • Piotr Kaluski
      Hi Tim, I think my documentation is correct, but I do agree with you, that there is a big chance for confusion. So I added a little warning to the
      Message 2 of 6 , Jun 3, 2006
      • 0 Attachment
        Hi Tim,
        I think my documentation is correct, but I do agree with you, that
        there is a big chance for confusion. So I added a little warning to
        the documentation of IsGrayedButton. Check it out and tell me what do
        you think.

        --Piotr


        --- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@...> wrote:
        >
        > Thanks Dennis,
        >
        > I think you are right. I was using
        > http://www.piotrkaluski.com/files/winguitest/docs/index.html as a
        > guide to the GuiTest functions. Maybe Pior will update his
        > documentation if many other people are as confused as me. It seems odd
        > that I should have to consult MSDN C++ documentation to find out how
        > to use Perl-based GuiTest. Maybe this function should be named
        > IsRB_CheckboxGrayed
        >
        > Yim Mitchell
        > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
        > <ctrondlpaulsden@> wrote:
        > >
        > > Hello,
        > > If this is a regular button, it is either enabled or disabled, see
        > > IsWindowEnabled. IsGrayedButtton is for radio buttons or checkboxes,
        > > per Microsoft documentation. See thread
        > > http://groups.yahoo.com/group/perlguitest/message/619 for more
        > > information.
        > >
        > > Regards,
        > > Dennis K. Paulsen
        > > --- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@> wrote:
        > > >
        > > > Has anyone else had this problem?
        > > >
        > > > Try this function. $Title is the string title of a window with the
        > > > button to test. $ButtonToCheck is the string caption on the button.
        > > >
        > > > sub VerifyButtonDisabled {
        > > > my $Title = shift;
        > > > my $ButtonToCheck = shift;
        > > > my @WinHandle = FindWindowLike(undef, $Title);
        > > > print("WinHandle = $WinHandle[0]\n"); # diagnostic
        > > > my @ButtonHandle = FindWindowLike($WinHandle[0],$ButtonToCheck);
        > > > print("ButtonHandle = $ButtonHandle[0]\n"); # diagnostic
        > > > my $ButtonState = IsGrayedButton($ButtonHandle[0]);
        > > > print("ButtonState = $ButtonState\n"); # diagnostic
        > > > if (IsGrayedButton($ButtonHandle[0])) {
        > > > print(" PASS: $ButtonToCheck button is disabled.\n");
        > > > } else {
        > > > print(" FAIL: $ButtonToCheck button is enabled.\n");
        > > > }
        > > > }
        > > >
        > > > When I use it on buttons that are either enabled or disabled I get
        > > > this same result:
        > > > FAIL: OK button is enabled.
        > > >
        > >
        >
      • Tim Mitchell
        Piotr, Thanks for clearing that up. The new note on the documentation helps. I guess I don t understand what an indeterminant state is. Can t we always
        Message 3 of 6 , Jun 3, 2006
        • 0 Attachment
          Piotr,

          Thanks for clearing that up. The new note on the documentation helps.

          I guess I don't understand what an "indeterminant" state is. Can't we
          always determine the state of an object if we want to know? Can't we
          always set the state so that it is always determined? I test software
          at a small software company. If one of our developers sent me a change
          with a functioning grayed button or a non-functioning not grayed
          button I would send it back to get fixed. I have always thought
          grayed-out and diabled are synonomous. But, now that I think of it, I
          have seen grayed-out menu bars that function. They turn black when you
          click on any menu item. I have always thought that this was a bug.
          Maybe it isn't. I don't think we can expect software users to
          understand the subtle difference between grayed-out and indeterminant.
          They have better things to think about.

          Tim Mitchell
          --- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@...> wrote:
          >
          > Hi Tim,
          > I think my documentation is correct, but I do agree with you, that
          > there is a big chance for confusion. So I added a little warning to
          > the documentation of IsGrayedButton. Check it out and tell me what do
          > you think.
          >
          > --Piotr
          >
          >
          > --- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@> wrote:
          > >
          > > Thanks Dennis,
          > >
          > > I think you are right. I was using
          > > http://www.piotrkaluski.com/files/winguitest/docs/index.html as a
          > > guide to the GuiTest functions. Maybe Pior will update his
          > > documentation if many other people are as confused as me. It seems odd
          > > that I should have to consult MSDN C++ documentation to find out how
          > > to use Perl-based GuiTest. Maybe this function should be named
          > > IsRB_CheckboxGrayed
          > >
          > > Yim Mitchell
          > > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
          > > <ctrondlpaulsden@> wrote:
          > > >
          > > > Hello,
          > > > If this is a regular button, it is either enabled or disabled, see
          > > > IsWindowEnabled. IsGrayedButtton is for radio buttons or
          checkboxes,
          > > > per Microsoft documentation. See thread
          > > > http://groups.yahoo.com/group/perlguitest/message/619 for more
          > > > information.
          > > >
          > > > Regards,
          > > > Dennis K. Paulsen
          > > > --- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@> wrote:
          > > > >
          > > > > Has anyone else had this problem?
          > > > >
          > > > > Try this function. $Title is the string title of a window with
          the
          > > > > button to test. $ButtonToCheck is the string caption on the
          button.
          > > > >
          > > > > sub VerifyButtonDisabled {
          > > > > my $Title = shift;
          > > > > my $ButtonToCheck = shift;
          > > > > my @WinHandle = FindWindowLike(undef, $Title);
          > > > > print("WinHandle = $WinHandle[0]\n"); # diagnostic
          > > > > my @ButtonHandle = FindWindowLike($WinHandle[0],$ButtonToCheck);
          > > > > print("ButtonHandle = $ButtonHandle[0]\n"); # diagnostic
          > > > > my $ButtonState = IsGrayedButton($ButtonHandle[0]);
          > > > > print("ButtonState = $ButtonState\n"); # diagnostic
          > > > > if (IsGrayedButton($ButtonHandle[0])) {
          > > > > print(" PASS: $ButtonToCheck button is disabled.\n");
          > > > > } else {
          > > > > print(" FAIL: $ButtonToCheck button is enabled.\n");
          > > > > }
          > > > > }
          > > > >
          > > > > When I use it on buttons that are either enabled or disabled I
          get
          > > > > this same result:
          > > > > FAIL: OK button is enabled.
          > > > >
          > > >
          > >
          >
        • stuart arnold
          Best example is probably a folder s property for the Read Only in explorer. If the files in the folder are read-only and some are full access, the checkbox
          Message 4 of 6 , Jun 4, 2006
          • 0 Attachment
            Best example is probably a folder's property for the 'Read Only' in
            explorer. If the files in the folder are read-only and some are full
            access, the checkbox for 'read-only' is 'filled-in' (indeterminate'),
            ie, not checked or unchecked.

            -----Original Message-----
            From: perlguitest@yahoogroups.com [mailto:perlguitest@yahoogroups.com]
            On Behalf Of Tim Mitchell
            Sent: Saturday, June 03, 2006 7:44 PM
            To: perlguitest@yahoogroups.com
            Subject: [perlguitest] Re: Bug? IsGrayedButton always returns FALSE



            Piotr,

            Thanks for clearing that up. The new note on the documentation helps.

            I guess I don't understand what an "indeterminant" state is. Can't we
            always determine the state of an object if we want to know? Can't we
            always set the state so that it is always determined? I test software
            at a small software company. If one of our developers sent me a change
            with a functioning grayed button or a non-functioning not grayed
            button I would send it back to get fixed. I have always thought
            grayed-out and diabled are synonomous. But, now that I think of it, I
            have seen grayed-out menu bars that function. They turn black when you
            click on any menu item. I have always thought that this was a bug.
            Maybe it isn't. I don't think we can expect software users to
            understand the subtle difference between grayed-out and indeterminant.
            They have better things to think about.

            Tim Mitchell
            --- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@...>
            wrote:
            >
            > Hi Tim,
            > I think my documentation is correct, but I do agree with you, that
            > there is a big chance for confusion. So I added a little warning to
            > the documentation of IsGrayedButton. Check it out and tell me what do
            > you think.
            >
            > --Piotr
            >
            >
            > --- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@> wrote:
            > >
            > > Thanks Dennis,
            > >
            > > I think you are right. I was using
            > > http://www.piotrkaluski.com/files/winguitest/docs/index.html as a
            > > guide to the GuiTest functions. Maybe Pior will update his
            > > documentation if many other people are as confused as me. It seems
            odd
            > > that I should have to consult MSDN C++ documentation to find out how
            > > to use Perl-based GuiTest. Maybe this function should be named
            > > IsRB_CheckboxGrayed
            > >
            > > Yim Mitchell
            > > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
            > > <ctrondlpaulsden@> wrote:
            > > >
            > > > Hello,
            > > > If this is a regular button, it is either enabled or disabled, see
            > > > IsWindowEnabled. IsGrayedButtton is for radio buttons or
            checkboxes,
            > > > per Microsoft documentation. See thread
            > > > http://groups.yahoo.com/group/perlguitest/message/619 for more
            > > > information.
            > > >
            > > > Regards,
            > > > Dennis K. Paulsen
            > > > --- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@>
            wrote:
            > > > >
            > > > > Has anyone else had this problem?
            > > > >
            > > > > Try this function. $Title is the string title of a window with
            the
            > > > > button to test. $ButtonToCheck is the string caption on the
            button.
            > > > >
            > > > > sub VerifyButtonDisabled {
            > > > > my $Title = shift;
            > > > > my $ButtonToCheck = shift;
            > > > > my @WinHandle = FindWindowLike(undef, $Title);
            > > > > print("WinHandle = $WinHandle[0]\n"); # diagnostic
            > > > > my @ButtonHandle =
            FindWindowLike($WinHandle[0],$ButtonToCheck);
            > > > > print("ButtonHandle = $ButtonHandle[0]\n"); # diagnostic
            > > > > my $ButtonState = IsGrayedButton($ButtonHandle[0]);
            > > > > print("ButtonState = $ButtonState\n"); # diagnostic
            > > > > if (IsGrayedButton($ButtonHandle[0])) {
            > > > > print(" PASS: $ButtonToCheck button is disabled.\n");
            > > > > } else {
            > > > > print(" FAIL: $ButtonToCheck button is enabled.\n");
            > > > > }
            > > > > }
            > > > >
            > > > > When I use it on buttons that are either enabled or disabled I
            get
            > > > > this same result:
            > > > > FAIL: OK button is enabled.
            > > > >
            > > >
            > >
            >









            SPONSORED LINKS
            Basic
            <http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Basic
            +programming+language&w2=C+programming+language&w3=Computer+programming+
            languages&w4=The+c+programming+language&w5=C+++programming+language&w6=S
            oftware+programming+language&c=6&s=193&.sig=p2tsb9F38_BRtgYd-Lrx9w>
            programming language C
            <http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=Basic+pro
            gramming+language&w2=C+programming+language&w3=Computer+programming+lang
            uages&w4=The+c+programming+language&w5=C+++programming+language&w6=Softw
            are+programming+language&c=6&s=193&.sig=s417rQDhIfEJWoylZxl7QQ>
            programming language Computer
            <http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=B
            asic+programming+language&w2=C+programming+language&w3=Computer+programm
            ing+languages&w4=The+c+programming+language&w5=C+++programming+language&
            w6=Software+programming+language&c=6&s=193&.sig=QgdknWHEB-7BcpDElLJcYw>
            programming languages
            The
            <http://groups.yahoo.com/gads?t=ms&k=The+c+programming+language&w1=Basic
            +programming+language&w2=C+programming+language&w3=Computer+programming+
            languages&w4=The+c+programming+language&w5=C+++programming+language&w6=S
            oftware+programming+language&c=6&s=193&.sig=DSnZ2EFeZa_krjnfz_P5vQ> c
            programming language C++
            <http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=Basic+p
            rogramming+language&w2=C+programming+language&w3=Computer+programming+la
            nguages&w4=The+c+programming+language&w5=C+++programming+language&w6=Sof
            tware+programming+language&c=6&s=193&.sig=IvzvhTPnaj_LFsbqs2knAg>
            programming language Software
            <http://groups.yahoo.com/gads?t=ms&k=Software+programming+language&w1=Ba
            sic+programming+language&w2=C+programming+language&w3=Computer+programmi
            ng+languages&w4=The+c+programming+language&w5=C+++programming+language&w
            6=Software+programming+language&c=6&s=193&.sig=pUnPrY01tNTjZVkDEHkvYQ>
            programming language

            _____

            YAHOO! GROUPS LINKS



            * Visit your group "perlguitest
            <http://groups.yahoo.com/group/perlguitest> " on the web.


            * To unsubscribe from this group, send an email to:
            perlguitest-unsubscribe@yahoogroups.com
            <mailto:perlguitest-unsubscribe@yahoogroups.com?subject=Unsubscribe>


            * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            Service <http://docs.yahoo.com/info/terms/> .


            _____




            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.