Best Autoscripters,
I hope someone can help me with my script. it's going to be fun.
ahwell the code is:
and my question is when i try to press the load button the program gets shutdown but that's not what i want i want the ini file to be loaded and get the information i saved.
the rest of my script works as i intented to be. except that when i press start the menu is still open but ahwell xD i can fix that later
Greetz
I hope someone can help me with my script. it's going to be fun.
ahwell the code is:
[ autoit ]
#include #include #include #Region ### START Koda GUI section ### Form=c:\users\tti007\desktop\test.kxf $menu_start = GUICreate("menu_start", 153, 209, 301, 264) $name = GUICtrlCreateButton("Name", 40, 8, 75, 25) $race = GUICtrlCreateButton("Race", 40, 32, 75, 25) $class = GUICtrlCreateButton("Class", 40, 56, 75, 25) $sex = GUICtrlCreateButton("Sex", 40, 80, 75, 25) $start = GUICtrlCreateButton("Start", 40, 120, 75, 25) $load = GUICtrlCreateButton("Load game", 40, 168, 75, 25) $save = GUICtrlCreateButton("Save Game", 40, 144, 75, 25) $gold = 100 GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $save IniWrite ("U:\test.ini","section", "name", $name1) IniWrite ("U:\test.ini","section", "class", $class1) IniWrite ("U:\test.ini","section", "race", $race1) IniWrite ("U:\test.ini","section", "sex", $sex1) IniWrite ("U:\test.ini","section", "gold", $gold) Case $load IniRead ("U:\test.ini", "section", "name") IniRead ("U:\test.ini", "section", "class") IniRead ("U:\test.ini", "section", "race") IniRead ("U:\test.ini", "section", "sex") IniRead ("U:\test.ini", "section", "gold") Case $race $race1 = InputBox ("race", "Hello "&$name1 &" What is your race?") Case $class $class1 = InputBox ("class", "Hello "&$name1 &" What is your class?") Case $sex $sex1 = InputBox ("sex", "Hello "&$name1 &" What is your sex?") Case $name $name1 = InputBox ("hello", "What's your name?") Case $start #Region ### START Koda GUI section ### Form=c:\users\tti007\desktop\test2.kxf $game = GUICreate("test", 1026, 691, 523, 269) $statsg = GUICtrlCreateGroup("", 0, 0, 1025, 57) $namel = GUICtrlCreateLabel("name: "&$name1, 16, 24, 75, 17) $racel = GUICtrlCreateLabel("Race: "&$race1, 184, 24, 75, 17) $classl = GUICtrlCreateLabel("Class: "&$class1, 368, 24, 75, 17) $sexl = GUICtrlCreateLabel("Sex: "&$sex1, 520, 24, 75, 17) $goldl = GUICtrlCreateLabel("Gold: "&$gold, 640, 24, 75, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $menug = GUICtrlCreateGroup("", 0, 56, 209, 633) $menub = GUICtrlCreateButton("Menu", 64, 656, 75, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) $maing = GUICtrlCreateGroup("", 208, 56, 817, 633) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndSwitch WEnd
the rest of my script works as i intented to be. except that when i press start the menu is still open but ahwell xD i can fix that later
Greetz