therion Posted May 26, 2005 Posted May 26, 2005 (edited) ive been trying to figure this out but cant do it. say i have a checkbox which say enables and disables a registry setting.How do i get it to remember it was checked after ive shut the program down so that the user knows thats its either enabled or disabled? Edited May 26, 2005 by therion
GaryFrost Posted May 26, 2005 Posted May 26, 2005 either save it in a ini file or registry key or some other type of file you app can read. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
/dev/null Posted May 26, 2005 Posted May 26, 2005 say i have a checkbox which say enables and disables a registry setting.How do i get it to rememberAs you say: If the registry key is enabled the checkbox was set, otherwise it was not set. So, the registry key you want to set is everything you need, as you can use it as a "flag".CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
therion Posted May 26, 2005 Author Posted May 26, 2005 cheers guys.I think i understand what you mean.I'll give it a go now.
therion Posted May 28, 2005 Author Posted May 28, 2005 nope.i tried but i cant get my head around it. can someone post an example as i've been trying for days and cant do.I've tried searching but dont really know what im searching for.Cheers.
Helge Posted May 28, 2005 Posted May 28, 2005 (edited) You are saying that you want the script to "remember" the stateof the checkbox. You are also saying that the checkbox togglesa registry setting on and off. See the connection here ? Why not read the registry-value at the beginning of the script,and if the value says that the registry setting is enabled youjust create the checkbox like this :$cCheckBox = GUICtrlCreateCheckbox("Checkbox",10,10,100,20) GUICtrlSetState($cCheckBox,$GUI_CHECKED)And later when the checkbox is pressed you just do the same,but this time you also change the registry-value to theopposite setting it's currently set to :Select Case $msg = $cCheckBox If RegRead(...) = "enabled" Then RegWrite("disable") GUICtrlSetState($cCheckBox,$GUI_UNCHECKED) Else RegWrite("enable") GUICtrlSetState($cCheckBox,$GUI_CHECKED) EndIfHopefully this will give you the idea and help you getting started.Good luck !-Helge- Edited May 28, 2005 by Helge
therion Posted May 29, 2005 Author Posted May 29, 2005 finally i got it to work.I just couldn't work it out for a while there. thanks for helping guys.
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