Gui, Add, Button, , Test
Gui, Add, CheckBox, vCheck1, Enable 'Save and Close'
Gui, show
Return
GuiEscape:
GuiClose:
ExitApp
ButtonTest:
{
TrySaveAndClose()
}
TrySaveAndClose()
{
if vCheck1 = 1
msgbox, checked
else if vCheck1 = 0
msgbox, unchecked
else
msgbox, this gets triggered every time
return
}Can I get the function to test the status of a checkbox, or am I going to have to figure this out using a g-label triggered when the checkbox changes?
I also tried it with a g-label just for giggles and it still is failing so I don't know what I'm doing wrong.
Gui, Add, Button, gCheckIt, Test
Gui, Add, CheckBox, vCheck1, Enable 'Save and Close'
Gui, show
Return
GuiEscape:
GuiClose:
ExitApp
CheckIt:
{
if vCheck1 = 1
msgbox, checked
else if vCheck1 = 0
msgbox, unchecked
else
msgbox, not sure why it triggers this
return
}




