ARozanski Posted October 20, 2008 Share Posted October 20, 2008 I have created a GUI that saves certain settings...such as wether a checkbox is checked or not...it saves the data to an .ini file - so if the checkbox is checked =1 if unchecked =0...how do i get the checkbox to be checked when i run the GUI if the data in the .ini is already = 1... thank you in advance... Link to comment Share on other sites More sharing options...
Rental Posted October 20, 2008 Share Posted October 20, 2008 I have created a GUI that saves certain settings...such as wether a checkbox is checked or not...it saves the data to an .ini file - so if the checkbox is checked =1 if unchecked =0...how do i get the checkbox to be checked when i run the GUI if the data in the .ini is already = 1... thank you in advance... you can do something like: #include <GuiConstantsEx.au3> GUICreate("") GUISetState(@sw_show) $box = GUICtrlCreateCheckbox("Test",10,10) $ini = IniRead("File.ini","default", 1, -1) If $ini = 1 Then GUICtrlSetState($box, $GUI_CHECKED) ElseIf $ini = 0 Then GUICtrlSetState($box, $GUI_UNCHECKED) EndIf While 1 $msg = GUIGetMsg() if $msg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd good luck with the rest Link to comment Share on other sites More sharing options...
ARozanski Posted October 20, 2008 Author Share Posted October 20, 2008 thank you very much!! 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