Hi,
I'm trying to write this GUI to an INI when I click the OK button. Right now it doesn't do anything.. the GUI doesn't even close when I click OK.
What gives? I've read through all the help files on iniwrite and don't see anything wrong
Thanks for any help anyone can offer.
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;;LABELS
$MTrainer = GUICreate("mt", 210, 265, 269, 218)
$MM = GUICtrlCreateLabel("Mm:", 16, 56, 70, 17)
$HS = GUICtrlCreateLabel("hs:", 32, 80, 50, 17)
$R = GUICtrlCreateLabel("r:", 56, 104, 29, 17)
$Ok = GUICtrlCreateButton("Ok", 56, 232, 105, 25, 0)
$Max = GUICtrlCreateLabel("m:", 8, 200, 135, 17)
$Hotkey = GUICtrlCreateLabel("hk", 88, 32, 38, 17)
$S = GUICtrlCreateGroup("ss", 8, 8, 161, 169)
;;INPUTS
$Mi = GUICtrlCreateInput("", 96, 48, 20, 21)
GUICtrlSetLimit(-1, 2)
$He = GUICtrlCreateInput("", 96, 72, 20, 21)
GUICtrlSetLimit(-1, 2)
$Re = GUICtrlCreateInput("", 96, 96, 20, 21)
GUICtrlSetLimit(-1, 2)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Ma = GUICtrlCreateInput("", 144, 192, 40, 21)
GUICtrlSetLimit(-1, 3)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg = $GUI_EVENT_CLOSE
Exit
Case $Ok
IniWrite("\config.ini", "Variables", "$hs", GuiCtrlRead($he))
IniWrite("\config.ini", "Variables", "$mi", GuiCtrlRead($mi))
IniWrite("\config.ini", "Variables", "$r", GuiCtrlRead($re))
IniWrite("\config.ini", "Variables", "$mt", GuiCtrlRead($ma))
EndSelect
WEnd