eckyecky Posted December 15, 2007 Share Posted December 15, 2007 (edited) nevermind solved mods please delete thiscan someone help me with this$cb* is a checkbox and $tb* is an inputFunc OnAutoItExit () $enableglobaluser = GUICtrlRead($cbEnableglobaluser) $enableglobalpass = GUICtrlRead($cbEnableglobalpass) $globaluser = GUICtrlRead($tbGlobaluser) $globalpass = _StringEncrypt(1,GUICtrlRead($tbGlobalPass),$encryptionpass) $enableadvercash = GUICtrlRead($cbAdvercashenabled) $advercashuser = GUICtrlRead($tbadvercashuser) $advercashpass = _StringEncrypt(1,GUICtrlRead($tbadvercashpass),$encryptionpass) iniwrite($inifile,"Default","EnableGlobaluser",$enableglobaluser) iniwrite($inifile,"Default","EnableGlobalpass",$enableglobalpass) iniwrite($inifile,"Default","Globaluser",$globaluser) iniwrite($inifile,"Default","Globalpass",$enableadvercash) Iniwrite($inifile, "Default", "EnableAdvercash", $enableadvercash) IniWrite($inifile, "Default", "Advercashuser", $advercashuser) IniWrite($inifile, "Default", "advercashpass", $advercashpass) EndFunc;==>OnAutoItExitwhen they all have useful stuff in the variables i get the following ini[Default] EnableGlobaluser=0 EnableGlobalpass=0 Globaluser=0 Globalpass=0 EnableAdvercash=0 Advercashuser=0 advercashpass= Edited December 15, 2007 by eckyecky Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 15, 2007 Share Posted December 15, 2007 Could You Upload The Full Script? Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
Scriptonize Posted December 15, 2007 Share Posted December 15, 2007 (edited) Hi eckyecky, I'm not sure what you expected for the output data, but if you want to have the checkbox state you need to use this piece of code: CODEBitAnd(GUICtrlRead($Item),$GUI_CHECKED) It will return 0 "zero" for Not Checked and it will return 1 "one" for Checked. Also I assume that the vars used to read the guicontrols are the handles to those controls. If not you need to use handles to them. Something like... CODE#include <GUIConstants.au3> GUICreate("My GUI Checkbox") ; will create a dialog box or 'form' that when displayed is centered $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) ;create a checkbox on the GUI created above ;^-----------------is the handle of that checkbox $BtnCheck=GUICtrlCreateButton("Check State",10,50,120,20) ;create a button ;^-----------------is the handle of that button GUISetState () ; will display an dialog box with 1 checkbox and one button ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $BtnCheck MsgBox(0,"CheckBox State","The state is now " & BitAnd(GUICtrlRead($checkCN),$GUI_CHECKED) ) EndSelect Wend Edited December 15, 2007 by Scriptonize If you learn from It, it's not a mistake Link to comment Share on other sites More sharing options...
eckyecky Posted December 15, 2007 Author Share Posted December 15, 2007 (edited) thanks but i set it to run those before it started exiting code was fine just in wrong place it seemed it deleted the controls before i accessed them so moved it to before autoit exit Edited December 15, 2007 by eckyecky Link to comment Share on other sites More sharing options...
Scriptonize Posted December 15, 2007 Share Posted December 15, 2007 OK, glad you could fix your problem If you learn from It, it's not a mistake 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