Jump to content

checking for a group of checkboxes


Recommended Posts

I have a group of check-box  they can be at various state (check or uncheck )

The GUI is from an external windows program, I am able to get the states of the check-box (check or uncheck )

The problem I have  10 of those boxes to check the state, can someone give some idea how to tackle it

All boxes must be checked if while checking one box is unchecked then  it should exit the loop

 

while 1
ConsoleWrite(Controlcommand($Whnd,"","[CLASS:ClaCheck;ID:16391;INSTANCE:1]","IsChecked","") &@CRLF)

;

'
ConsoleWrite(Controlcommand($Whnd,"","[CLASS:ClaCheck;ID:16403;INSTANCE:7]","IsChecked","") &@CRLF )
WEnd

 any comment and feedback is welcome

 

 

checkboxes.GIF

Link to comment
Share on other sites

Use a For/Next loop from 1 to 10 (number of radio controls) :

For $i = 1 To 10
    $iState = Controlcommand($hWnd,"","[CLASS:ClaCheck; INSTANCE:" & $i & "]","IsChecked","")
    If $iState Then 
        ConsoleWrite("[CLASS:ClaCheck; INSTANCE:" & $i & "] is checked" & @CRLF)
    Else
        ConsoleWrite("[CLASS:ClaCheck; INSTANCE:" & $i & "] is NOT checked ===> ExitLoop" & @CRLF)
        ExitLoop
    EndIf
Next

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...