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

1258How to know button is enabled or disabled?

Expand Messages
  • ashastry06
    Jan 4, 2006
    • 0 Attachment
      Hi,
      I want to click the button only, if the button is enabled. if not
      do something else. Please tell what am I doing wrong? Attaching part
      of my code.


      my @childern = GetChildWindows($_);
      for (@childern) {
      $buttonName = WMGetText($_);
      print $buttonName,"\n";
      $className = GetClassName($_);
      # $BName == ("^\&Options" );

      if ($buttonName == $BName ) {
      $res = IsWindowEnabled($BName) ;
      if($res == 'TRUE'){
      MouseMoveAbsPix($x+150,$y+305);#Options
      SendMouse("{LEFTCLICK}");
      print "in while loop","\n";
      }
      print "out of while loop","\n";
      }
      else {
      print "whoops","\n";
      }

      }


      Thanks,
      Aparna
    • Show all 3 messages in this topic