Hi, please help me load the saved data back into the field.
Thank you much
#include <GUIConstants.au3>
$gui = GUICreate("test", 300, 100)
$input1 = GUICtrlCreateInput("", 10, 10, 250, 30)
$input2 = GUICtrlCreateInput("", 10, 40, 250, 30)
$SaveBnt = GUICtrlCreateButton("Save", 15, 70, 50, 30)
$loadBnt = GUICtrlCreateButton("Load", 100, 70, 50, 30)
$iniFile = @ScriptDir & "\test.ini"
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $SaveBnt
Save()
Case $loadBnt
Load()
EndSwitch
WEnd
Func Save()
IniWrite($iniFile, "Input1", "Message", GUICtrlRead($input1))
IniWrite($iniFile, "Input2" , "Message", GUICtrlRead($input2))
EndFunc
Func Load()
$saved = IniReadSectionNames($iniFile)
EndFunc