I am unable to get past the error:"A control's variable must be global or static". My requirement is that the scope of control variables be limited to the class (cannot be global withing file scope), but at the same time be accessable for outside functions. How do I do that?
Code: Select all
class panel
{
check1ON := False
check2ON := False
check3ON := False
check4ON := False
check5ON := False
generate_gui()
{
WinGet, gamewindow_handle, ID, % gamewindow
Gui, +AlwaysOnTop -SysMenu +Owner%gamewindow_handle%
Gui, Add, Text, , % "Enable checks:"
Gui, Add, CheckBox, vcheck1ON, % "Check 1"
Gui, Add, CheckBox, vcheck2ON, % "Check 2"
Gui, Add, CheckBox, vcheck3ON, % "Check 3"
Gui, Add, CheckBox, vcheck4ON, % "Check 4"
Gui, Add, CheckBox, vcheck5ON, % "Check 5"
Gui, Add, Button, w80, % "Calibrate"
}
toggle_panel()
{
if WinExist("Script control panel")
Gui, Hide
else
{
Gui, Show, NoActivate , % "Script control panel"
}
return
}
}
debug()
{
MsgBox, % panel.check1ON
return
}