#include #include #include #include #include #include Example() Func Example() Local $hGUI, $idInput1, $idInput2, $idEdit1, $idBtnOk, $idBtnReset, $idCheck1, $idCheck2 $hGUI = GUICreate("Example", 600, 400) $idInput1 = GUICtrlCreateInput("", 20, 10, 300, 25) $idInput2 = GUICtrlCreateInput("", 20, 50, 300, 25) $idCheck1 = GUICtrlCreateCheckbox("Checkbox 1", 350, 15, 100, 17) $idCheck2 = GUICtrlCreateCheckbox("Checkbox 2", 350, 45, 100,17) $idEdit1 = GUICtrlCreateEdit("", 20, 100, 300, 200, $ES_AUTOVSCROLL + $WS_VSCROLL) $idBtnOk = GUICtrlCreateButton("Ok", 20, 350, 100, 25) $idBtnReset = GUICtrlCreateButton("Reset", 140, 350, 100, 25) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idBtnOk If BitOR(GUICtrlRead($idInput1) == "", GUICtrlRead($idInput2) == "") Then ConsoleWrite("> >>> Inputs are empty ... " & @CRLF) Else ConsoleWrite("> >>> Inputs are not empty ... " & @CRLF) GUICtrlSetData($idEdit1, GUICtrlRead($idEdit1) & GUICtrlRead($idInput1) & Chr(32) & GUICtrlRead($idInput2)) EndIf Case $idBtnReset GUICtrlSetData($idEdit1, "") Case $idCheck1 If BitAND(GUICtrlRead($idCheck1), $BN_CLICKED) = $BN_CLICKED Then If _GUICtrlButton_GetCheck($idCheck1) Then ConsoleWrite("> >>> $idCheck1 checked ... " & @CRLF) GUICtrlSetData($idEdit1, GUICtrlRead($idEdit1) & "Awesome") Else ConsoleWrite("> >>> $idCheck1 unchecked ... " & @CRLF) EndIf EndIf EndSwitch WEnd EndFunc ;==>Example