How to check which checkboxes are checked (Multiple checkboxes)
Posted: 03 May 2024, 22:21
I want to append each checkbox control name to a text file, this is what the gui looks like:
Each checkbox is named mob1, mob2, mob3, ... and they all point to 1 gLabel called mobmenu
Heres my current code for the glabel, i tried using a variable for ControlGet but it doesnt work
How do I make it so that every box that is checked gets appended to a txt file?
Each checkbox is named mob1, mob2, mob3, ... and they all point to 1 gLabel called mobmenu
Heres my current code for the glabel, i tried using a variable for ControlGet but it doesnt work
Code: Select all
mobmenu:
Gui, Submit, NoHide
_count = 0
Loop {
_count++
_mob := "mob" . _count
if (_count < 22) {
ControlGet, isChecked, Checked,, %_mob%
msgbox % _mob " = " isChecked " count is " _count ;isChecked is always blank, %_mob% is not getting read in the line above
if (isChecked = 1) {
FileAppend, %_mob%, CMAP.txt
}
}
}
return