Sign in to follow this  
Followers 0
Hansio

GUI read from ini

4 posts in this topic

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))

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

How do I read what already written in the ini file?

Use IniRead() as the GUICtrlCreateInput() text. Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Also you can use GuiCtrlSetData() to update your Gui.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

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")

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0