Hello everyone. I've just joined the community and also just started using autoit. I'm really new to it, so please don't judge me too heavily. In any case, here's my question:
I got multiple Checkboxes situated over Buttons. I have script manipulating checkbox(on button click checkbox will be checked or unchecked, depending on condition). Is there a way to do that with all checkboxes using arrays and for statement? Or any other method?
Here's what I came up with(of course not working):
Global $BUTTON[5]
Global $CHECKBOX[5]
$BUTTON[1] = EZSKINBUTTON("button1", 35, 60, 75, 30)
$CHECKBOX1 = GUICtrlCreateCheckbox("", 85, 70, 10, 10)
$BUTTON[2] = EZSKINBUTTON("button2", 35, 100, 100, 30)
$CHECKBOX[2] = GUICtrlCreateCheckbox("", 85, 110, 10, 10)
$BUTTON[3] = EZSKINBUTTON("button3", 35, 140, 100, 30)
$CHECKBOX[3] = GUICtrlCreateCheckbox("", 85, 150, 10, 10)
$BUTTON[4] = EZSKINBUTTON("button4", 35, 180, 100, 30)
While 1
EZSKINOVER()
$MSG = GUIGetMsg()
For $i = 1 to 6 Step +1
If $MSG = $BUTTON[$i] Then
If GUICtrlRead($CHECKBOX[$i] = $GUI_CHECKED Then
GUICtrlSetState($CHECKBOX[$i], $GUI_UNCHECKED)
Else
GUICtrlSetState($CHECKBOX[$i], $GUI_CHECKED)
EndIf
EndIf
Next
WEnd
#endregion
Or do I have to declare each set manually? :S
Any help would be appreciated. Thank you in advance.