
' ==========================================================
'   EXTERNAL COMMANDS TESTER --- SEND
' ==========================================================

Variable Numeric Slot_ExternalCommands = 1

Button 1 Label Beep
Button 2 Label WaitSlot3
Button 3 Label Command3

Stop

' =============================================================
'  SEND COMMAND (default timeout = 0.5 Sec)
' =============================================================
Label SendCommand
	Variable Numeric SC1       '<-- Parameter Destinat.-Slot
	Variable String  SC2       '<-- Parameter Command-String
	Variable Numeric SC3 = 0.5 '<-- The timeout in seconds
	Variable Numeric SC4
	SlotText SC1 = SC2
	For SC4 = 0.1 To SC3 Step 0.1
		If SlotText(SC1) = ""
			Exit
		EndIf
		Wait Seconds 0.1
	Next
Return

' ----------------------------------------------
'  COMMANDS
' ----------------------------------------------
Label Beep
	SendCommand(Slot_ExternalCommands)("Beep")
Return
Label WaitSlot3
	SendCommand(Slot_ExternalCommands)("WaitSlot3")
Return
Label Command3
	SendCommand(Slot_ExternalCommands)("Command3")
Return


'WATCH v1
'EXEC DestX = 12
