Variable Numeric Slot_ExternalCommands = 1
Load "Theremino_QRdecoder.exe"
Load "Theremino_SoundPlayer.exe"
'Window FullScreen
Stop

Label EventStop
	Window Sizable
End

Label Event_ExternalCommands
	' --------------------------------- Extract first word
	Select GetSeparatedString(CommandText, 0)
		Case ""
		' -----------------------------
		Case "cose"
			Load "Video 1_convertito.avi"
			AudioStart(1)
		Case "indaffarata"
			Load "Video 2_convertito.avi"
			AudioStart(2)
		Case "utensili"
			Load "Video 3_convertito.avi"
			AudioStart(3)
			Wait Not MediaPlaying '
		Case "mente"
			Load "Video 4_convertito.avi"
			AudioStart(4)
			' ------------------------- Unrecognized command
		CaseElse
			Wait Seconds 0.5
			Beep 200 500
			Print "Unrecognized command: " + CommandText
			Wait Seconds 0.5
			ClearCommand
	EndSelect
Return

Label ClearCommand
	SlotText(Slot_ExternalCommands) = ""
Return

Label AudioStart
	Variable Numeric AudioNum
	Slot 3 = AudioNum - 1
	Wait Seconds 0.1
	Slot 2 = 0
	Wait Seconds 0.1
	Slot 2 = 1000
	Wait Seconds 0.1
Return


