ecstatic Posted April 13, 2009 Share Posted April 13, 2009 Hey guys im having alot of trouble with this $Pindle = GUICtrlCreateCheckbox("Pindle", 528, 56, 97, 17) This is what i had If $pindle = check Then Iniwrite("Config.ini", "Account Info", "Pindle", "Yes") Endif If $Pindle = not check Then Iniwrite("Config.ini, "Account Info", "Pindle", "No") Endif I want it so if the user clicks the checkbox, then when i click save (not in here) it will write to config.ini saying yes to pindle. And no if they dont. Where would i go about starting this? Link to comment Share on other sites More sharing options...
Valuater Posted April 13, 2009 Share Posted April 13, 2009 Maybe... If _IsChecked($pindle) Then IniWrite("Config.ini", "Account Info", "Pindle", "Yes") Else IniWrite("Config.ini", "Account Info", "Pindle", "No") EndIf Func _IsChecked($control) Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked 8) Link to comment Share on other sites More sharing options...
ecstatic Posted April 13, 2009 Author Share Posted April 13, 2009 Thanks! It worked Link to comment Share on other sites More sharing options...
andybiochem Posted April 14, 2009 Share Posted April 14, 2009 (edited) Another solution, if you're interested Iniwrite("Config.ini","Account Info","Pindle","No") If GUICtrlRead($pindle) = 1 Then Iniwrite("Config.ini","Account Info","Pindle","Yes") ....automatically write "No", but if checkbox ticked, overwrite with "Yes". Edited April 14, 2009 by andybiochem - Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar! 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