joker17 Posted October 15, 2007 Share Posted October 15, 2007 Also i need to create a checbox like this: #include <GUIConstants.au3> GUICreate("My GUI Checkbox") ; will create a dialog box that when displayed is centered $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) GUISetState () ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd and it works perfect but i need to do a simple script like: if checked then do controlsend etc, if not checked continue with the script can someone help me? Link to comment Share on other sites More sharing options...
Nahuel Posted October 15, 2007 Share Posted October 15, 2007 Look for GuiCtrlRead() in the help file #include <GUIConstants.au3> GUICreate("My GUI Checkbox",100,100) ; will create a dialog box that when displayed is centered $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) $Ok=GUICtrlCreateButton("OK",10,50) GUISetState () ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $Ok $isChecked=GUICtrlRead($checkCN) If $isChecked=$GUI_CHECKED Then MsgBox(0,"","Hey! it's checked!") Else MsgBox(0,"","Hey! it isn't checked!") EndIf EndSwitch WEnd 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