joker17 0 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? Share this post Link to post Share on other sites
Nahuel 1 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 Share this post Link to post Share on other sites