Hansio Posted September 2, 2011 Posted September 2, 2011 I have a gui that writes something to a ini. It works as it should but when I open my gui then it is empty. How do I read what already written in the ini file? $L_MB_Entrypoint=GUICtrlCreateLabel("MB Entrypoint ID:",30,53,90,20) $MB_Entrypoint=GUICtrlCreateInput("",130,50,200,20) IniWrite(@Scriptdir & "\config.ini", "section", "MB_Entrypoint", GUICtrlRead($MB_Entrypoint))
somdcomputerguy Posted September 2, 2011 Posted September 2, 2011 (edited) How do I read what already written in the ini file?Use IniRead() as the GUICtrlCreateInput() text. Edited September 2, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
hannes08 Posted September 2, 2011 Posted September 2, 2011 Also you can use GuiCtrlSetData() to update your Gui. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Hansio Posted September 2, 2011 Author Posted September 2, 2011 Thanks guys I have a problem here. The Checkbox is not selected even though it says Yes in the file $icons = IniRead(@Scriptdir & "\config.ini", "section", "Hide Icons", "") $L_Hide_Icons=GUICtrlCreateLabel("Hide Icons:", 30,176,90,20) $Hide_Icons=GUICtrlCreateCheckbox("", 130, 175, 97, 17) IniWrite(@Scriptdir & "\config.ini", "section", "Hide Icons","No") If GUICtrlRead($Hide_Icons) = 1 Then Iniwrite(@Scriptdir & "\config.ini", "section", "Hide Icons","Yes")
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