#Region ### START Koda GUI section ### Form= global $Form1_1_1 = GUICreate("ArduinoCommInterface", 403, 329, 194, 126) global $UserInput = GUICtrlCreateInput("", 8, 296, 97, 21) global $SendButton = GUICtrlCreateButton("Send", 120, 296, 83, 25) global $ExitButton = GUICtrlCreateButton("Exit", 336, 296, 57, 25) global $TestButton = GUICtrlCreateButton("Run Test", 312, 32, 81, 41) global $TestDetail = GUICtrlCreateEdit("", 8, 80, 385, 209, BitOR($GUI_SS_DEFAULT_EDIT, $ES_READONLY)) global $TestStatus = GUICtrlCreateInput("TestStatus", 8, 8, 385, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_READONLY)) global $TestResult = GUICtrlCreateLabel("TestResult", 8, 40, 297, 36) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitTestProgram() Case $ExitButton ExitTestProgram() Case $TestButton PerformTest() ;MsgBox(0, 0, "Test Button Pressed") Case $SendButton UpdateTestInfo("Manual Command", ArduinoTest(GUICtrlRead($UserInput), 5), "") EndSwitch WEnd