When I do a Checkbox and check it, the script works fine, and when I uncheck it, still works, but if I try to check it again I get the text:
" The same varible cannot be used for more than one control "
What I want is for the Edit only to be shown when the Checkbox is checked, how do I make this work?
Code: Select all
^!a::
Gui, Font, s16 Bold
Gui, Add, Text, +Center w350, Hello World
Gui, Font
Gui, Add, Checkbox, x20 y60 vVar gTest, Check this box!
Gui, +AlwaysOnTop
Gui, Submit, NoHide
Gui, Show, x500 y500 w400 h300, Box
return
Test:
Gui, Submit, NoHide
if(Var==1)
{
Gui, Add, Edit, x20 r5 w200 vInput, Write some text
}
Else
{
GuiControl, Hide, Input
}
return