Hey Guys,
I want to add a new checkbox with its own variable every time the add button is clicked.
The added checkboxes should remain when I close the window or exit the script and when I reopen I should be able to add new checkboxes aswell.
here is what I have so far..
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <MsgBoxConstants.au3>
#include <GuiButton.au3>
$test = GUICreate("adding test", 475, 345, 500, 175)
$Check1 = GUICtrlCreateCheckbox("Checkbox 1", 15, 25, 300, 25)
$Button = GUICtrlCreateButton("Add", 365, 25, 90, 20)
$Check2 = GUICtrlCreateCheckbox("Checkbox 2", 15, 50, 300, 25)
$Check3 = GUICtrlCreateCheckbox("Checkbox 3", 15, 75, 300, 25)
GUICtrlSetState($Check2, $GUI_HIDE)
GUICtrlSetState($Check3, $GUI_HIDE)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
;
Exit
Case $Button
GUICtrlSetPos($Check2, 15, 50, 300, 25)
GUICtrlSetState($Check2, $GUI_SHOW)
Case $Button
GUICtrlSetPos($Check3, 15, 75, 300, 25)
GUICtrlSetState($Check3, $GUI_SHOW)
EndSwitch
WEnd