blizzedout Posted August 27, 2005 Share Posted August 27, 2005 Hey i have $rad1 = Iniread("Save.ini","Radio","Radio_1", "4") $radio1 = GUICtrlCreateCheckbox ("", 14, 96, -1, 20) $r1 = GUISetState ($rad1) Func Save() IniWrite("Save.ini", "Radio", "Radio_1",GUICtrlRead($Radio1)) EndFunc what am i doing wrong Link to comment Share on other sites More sharing options...
therks Posted August 27, 2005 Share Posted August 27, 2005 (edited) ... Just about everything.First, the function you're looking for is GuiCtrlSetState, not GuiSetState. Second, you need to pass it a control ID ($radio1) as the first parameter, then the state ID ($rad1). And last.. what's that -1 in the Checkbox creation for? It's not necessarily wrong, but it's probably not right either.*Edit: Clarification. Edited August 27, 2005 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
SupraNatural Posted August 27, 2005 Share Posted August 27, 2005 (edited) Here's what i did and it works fine (watch for wrap) Opt("GuiOnEventMode",1) GuiCreate("test",200,200) $radio1 = GUICtrlCreateRadio("", 14, 96, -1, 20) $rad1 = Iniread("Save.ini","Radio","Radio_1", "4") if $rad1 = 4 Then IniWrite("Save.ini", "Radio", "Radio_1",GUICtrlRead($Radio1)) EndIf GuiCtrlSetOnEvent($radio1,"save") $r1 = GUISetState ($rad1) GUISetState(@Sw_show) While 1 sleep(1000) WEnd Func Save() IniWrite("Save.ini", "Radio", "Radio_1",GUICtrlRead($Radio1)) EndFunc Edited August 27, 2005 by SupraNatural Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it! Link to comment Share on other sites More sharing options...
blizzedout Posted August 27, 2005 Author Share Posted August 27, 2005 ... Just about everything.First, the function you're looking for is GuiCtrlSetState, not GuiSetState. Second, you need to pass it a control ID ($radio1) as the first parameter, then the state ID ($rad1). And last.. what's that -1 in the Checkbox creation for? It's not necessarily wrong, but it's probably not right either.*Edit: Clarification.<{POST_SNAPBACK}>Thank you worked fine like you said$rad1 = Iniread("Save.ini","Radio","Radio_1", "4") $radio1 = GUICtrlCreateCheckbox ("", 14, 96, -1, 20) $r1 = GuiCtrlSetState (-1, $rad1) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now