#include #include #include #include #include #include #Region ### START Koda GUI section ### Form=C:\Users\Michael Jang\Desktop\GUI_TEST.kxf $Form1 = GUICreate("GUI Demo", 580, 309, 875, 428) GUISetBkColor(0x0078D7) $Group1 = GUICtrlCreateGroup("BASIC INFO", 24, 24, 249, 161) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) $Label1 = GUICtrlCreateLabel("Name:", 56, 72, 65, 28) GUICtrlSetColor(-1, 0x000000) $Label2 = GUICtrlCreateLabel("Gender:", 40, 120, 80, 28) GUICtrlSetColor(-1, 0x000000) $Input1 = GUICtrlCreateInput("", 128, 72, 97, 31) GUICtrlSetFont(-1, 14, 800, 0, "Calibri") $Input2 =GUICtrlCreateInput("", 128, 120, 97, 31) GUICtrlSetFont(-1, 14, 800, 0, "Calibri") GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("MORE INFO", 304, 24, 249, 161) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) $Label3 = GUICtrlCreateLabel("Age:", 344, 72, 48, 28) GUICtrlSetColor(-1, 0x000000) $Label4 = GUICtrlCreateLabel("Hobby:", 320, 120, 71, 28) GUICtrlSetColor(-1, 0x000000) $Input3 = GUICtrlCreateInput("", 408, 72, 97, 31) GUICtrlSetFont(-1, 14, 800, 0, "Calibri") $Input4 =GUICtrlCreateInput("", 408, 120, 97, 31) GUICtrlSetFont(-1, 14, 800, 0, "Calibri") GUICtrlCreateGroup("", -99, -99, 1, 1) $But_Load = GUICtrlCreateButton("LOAD", 80, 232, 97, 41) $But_Save = GUICtrlCreateButton("SAVE", 232, 232, 113, 41) $But_Exit = GUICtrlCreateButton("EXIT", 384, 232, 113, 41) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $BASIC_INFO = [["key_Name", $Input1], _ ["key_Gender", $Input2]] Global $MORE_INFO = [["key_Age", $Input3], _ ["key_Hobby", $Input4]] While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $But_Load Load_Config("Load.ini") Case $But_Exit Exit EndSwitch WEnd Func Load_Config($Load_ini) MsgBox(0,"","Clear hit") $Section_Array = IniReadSection(@ScriptDir & "\" & $Load_ini, "BASIC INFO") $ROWS = UBound($Section_Array, $UBOUND_ROWS) _ArrayDisplay($Section_Array) For $i = 1 To $ROWS $temp_key = $Section_Array[$i][0] $temp_value = $Section_Array[$i][1] $srch_row = _ArraySearch($BASIC_INFO, $temp_key, 0, 0, 1, 1, 1) $mod_CID = $BASIC_INFO[$srch_row][1] GUICtrlSetData($mod_CID, $temp_value) Next EndFunc