Hansio Posted September 2, 2011 Share Posted September 2, 2011 I can not get my code to write to my ini file. Should I use GUICtrlRead $Key1=GUICtrlCreateCombo("", 130, 10, 70, 120) GUICtrlSetData(-1, "<none>|Alt +|Ctrl +|Shift +", "<none>") If $Key1="<none>" Then IniWrite(@Scriptdir & "\config.ini", "section", "Tester 2", GUICtrlRead("")) ElseIf $Key1="Alt +" Then IniWrite(@Scriptdir & "\config.ini", "section", "Tester 2", GUICtrlRead("!")) Elseif $Key1="Ctrl +" Then IniWrite(@Scriptdir & "\config.ini", "section", "Tester 2", GUICtrlRead("^")) ElseIf $Key1="Shift +" Then IniWrite(@Scriptdir & "\config.ini", "section", "Tester 2", GUICtrlRead("+")) EndIf Link to comment Share on other sites More sharing options...
monoscout999 Posted September 2, 2011 Share Posted September 2, 2011 It shoud be If GuiCtrlRead($Key1) = "<none>" Then ... ElseIf GuiCtrlRead($Key1) = "Alt +" Then... and so on Link to comment Share on other sites More sharing options...
somdcomputerguy Posted September 3, 2011 Share Posted September 3, 2011 I have found Switch to be useful for reading out of GUICtrlCreateCombo(), easier to read anyway..Switch GuiCtrlRead($Key1) Case "<none>" ; code here Case "Alt +" ;code here Case "Ctrl +" ;code here Case "Shift +" ;code here EndSwitch - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Hansio Posted September 5, 2011 Author Share Posted September 5, 2011 Thank you both Link to comment Share on other sites More sharing options...
somdcomputerguy Posted September 5, 2011 Share Posted September 5, 2011 You bet. Good luck with your project. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. 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