if the checkbox is reopened the checkbox should be enabled or dissabled. I have the problem that the Checkbox var is = 0 but the Checkbox isn´t enabled.
How is this working? Hope anyone know how to fix this..
Code: Select all
Gui, EmailServices: Default
IniRead,WebCheckBox,Settings.ini, Email, WebCheckBox ; Reads if what the Checkbox is (1 or 0)
Gui, Add, CheckBox, x10 y9 w70 h30 vWebCheckBox gWebCheckBox, Webmail ; Don´t change to the Value which is saved..
Gui, Add, Edit, x82 y13 w100 h20 disabled vWebEmail, Email ;Edit is activated by clicking on the checkbox..
Gui, Add, Edit, x192 y13 w100 h20 disabled vWebPassword, Password ;Edit is activated by clicking on the checkbox..
Gui, Add, Button, x300 y13 w35 h20 gWebsave, Save
Gui, Show, NA x5 y5 w750 h345
return
WebCheckBox:
guicontrolget, WebCheckBox
if WebCheckBox = 1
{
IniWrite, %WebCheckBox%, Settings.ini, Email, WebCheckBox ;Saves if the Checkbox is set to 1
IniRead, tempWebEmail, Settings.ini, Email, tempWebEmail
IniRead, tempWebPassword, Settings.ini, Email, tempWebPassword
WebEmail := b64Decode(tempWebEmail)
WebPassword := b64Decode(tempWebPassword)
guicontrol, Enable, WebEmail
guicontrol, , WebEmail
guicontrol, , WebEmail, %WebEmail%
guicontrol, Enable, WebPassword
guicontrol, +Password, WebPassword
guicontrol, , WebPassword, %WebPassword%
}
else
{
IniWrite, %WebCheckBox%, Settings.ini, Email, WebCheckBox ;Saves if the Checkbox is set to 0
guicontrol, -Password, WebEmail
guicontrol, Disable, WebEmail
guicontrol, , WebEmail, Email
guicontrol, -Password, WebPassword
guicontrol, Disable, WebPassword
guicontrol, , WebPassword, Password
}
return