demonsc Posted November 12, 2007 Posted November 12, 2007 Just need small help on this one thing. Basically all i want this to do is, IF this check Box is checked then DO THIS FUNCTION, otherwise if the checkbox is not checked DON'T DO IT, how would something like this work. I'm almost done making my program
Danny35d Posted November 12, 2007 Posted November 12, 2007 Example:#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("CheckBox", 160, 94) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox 1", 40, 24, 81, 17) $Button1 = GUICtrlCreateButton("Test", 40, 56, 75, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) = $GUI_CHECKED Then MsgBox(0, 'Example', 'Checkbox 1 check') Else MsgBox(0, 'Example', 'Checkbox 1 uncheck') EndIf EndSwitch WEnd AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
demonsc Posted November 12, 2007 Author Posted November 12, 2007 Example:#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("CheckBox", 160, 94) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox 1", 40, 24, 81, 17) $Button1 = GUICtrlCreateButton("Test", 40, 56, 75, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) = $GUI_CHECKED Then MsgBox(0, 'Example', 'Checkbox 1 check') Else MsgBox(0, 'Example', 'Checkbox 1 uncheck') EndIf EndSwitch WEnd Thats all i need thanks alot
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