
Variable Numeric Slot_ExternalCommands      = 53

Label Event_ExternalCommands
	' ------------------------------------------------------ Do not print lines containing ''
	'Print " Exec: " + CommandText + CRLF
	' ------------------------------------------------------
	Select GetSeparatedString(CommandText, 0)
		' ---------------------------------------------- ACTIONS
		Case "Say"
			TTS Speak Mid(CommandText, 5)
			Wait TTSready 
			ClearCommand
		Case "RedOn"
			ClearCommand
		Case "GreenOn"
			ClearCommand
		Case "BlueOn"
			ClearCommand
		Case "WhiteOn"
			ClearCommand
		Case "MagentaOn"
			ClearCommand
		Case "YellowOn"
			ClearCommand
		Case "Beep"
			Beep 880-100
			ClearCommand
		Case "StartPump"
			ClearCommand
		Case "StopPump"
			ClearCommand
		CaseElse
			Controls OpenTextBox
			Print CRLF + " Unrecognized command: " + CommandText + CRLF
			Beep
			ClearCommand
	EndSelect
Return

Label ClearCommand
	SlotText(Slot_ExternalCommands) = ""
Return


'WATCH COM_PortNames
'WATCH COM_Status
'WATCH COM_Received
