' ----------------------------------------------
'  Commands to Theremino_OpenAI
' ----------------------------------------------

Button 1 Label Send
Button 2 Label Get News
Button 3 Label Clear All

Button 5 Label Recog. ON
Button 6 Label Recog. OFF

Button 7 Label Speech ON
Button 8 Label Speech OFF

Button 10 Label Save
Button 11 Label Load
Button 12 Label Save_TestTxt
Button 13 Label Load_TestTxt

Button 17 Label Volume 10
Button 18 Label Volume 100

Button 20 Label Speed 3
Button 21 Label Speed 0

Button 23 Label Random 80
Button 24 Label Random 50

Button 26 Label Voice Elsa
Button 27 Label Voice ENG

Button 29 Label "Key MyFriend"
Button 30 Label "Key MyRobot"


Button 33 Label Options ON
Button 34 Label Options OFF

Button 36 Label Maximize
Button 37 Label Minimize
Button 38 Label Normal

Button 41 Label HowAreYou
Button HowAreYou Color Yellow9
Button 42 Label DateAndTime
Button DateAndTime Color Yellow9


Variable Numeric Slot_Text = 1
Variable Numeric Slot_Responses = 4
Variable Numeric Slot_Commands = 5

Loop

Stop

' =============================================================
'  LOOP
' =============================================================
Label Loop
	Print SlotText(Slot_Responses)
	Wait Seconds 0.01
Goto Loop

' =============================================================
'  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 TO OpenAI
' =============================================================
Label Send
	SendCommand(Slot_Commands)("Send")
Return
Label Get News
	SendCommand(Slot_Commands)("GetNews")
Return
Label Clear All
	s1 = "Average 120"
	SendCommand(Slot_Commands)("ClearAll")
Return

Label Recog. ON
	SendCommand(Slot_Commands)("RecogON")
Return
Label Recog. OFF
	SendCommand(Slot_Commands)("RecogOFF")
Return

Label Speech ON
	SendCommand(Slot_Commands)("SpeechON")
Return
Label Speech OFF
	SendCommand(Slot_Commands)("SpeechOFF")
Return

Label Save
	SendCommand(Slot_Commands)("Save")
Return
Label Load
	SendCommand(Slot_Commands)("Load")
Return

Label Save_TestTxt
	SendCommand(Slot_Commands)("Save test.txt")
Return
Label Load_TestTxt
	SendCommand(Slot_Commands)("Load test.txt")
Return


Label Volume 10
	SendCommand(Slot_Commands)("Volume 10")
Return
Label Volume 100
	SendCommand(Slot_Commands)("Volume 100")
Return
Label Speed 0
	SendCommand(Slot_Commands)("Speed 0")
Return
Label Speed 3
	SendCommand(Slot_Commands)("Speed 3")
Return
Label Random 50
	SendCommand(Slot_Commands)("Random 50")
Return
Label Random 80
	SendCommand(Slot_Commands)("Random 80")
Return

' Please use "-" or "_" instead of spaces
Label Voice Elsa
	SendCommand(Slot_Commands)("Voice Elsa")
Return
Label Voice ENG
	SendCommand(Slot_Commands)("Voice English-Male")
Return

' Please use "-" or "_" instead of spaces
Label Key MyFriend
	SendCommand(Slot_Commands)("Keyword My_Friend")
Return
Label Key MyRobot
	SendCommand(Slot_Commands)("Keyword My_Robot")
Return

Label Options ON
	SendCommand(Slot_Commands)("OptionsON")
Return
Label Options OFF
	SendCommand(Slot_Commands)("OptionsOFF")
Return

Label Maximize
	SendCommand(Slot_Commands)("Maximize")
Return
Label Minimize
	SendCommand(Slot_Commands)("Minimize")
Return
Label Normal
	SendCommand(Slot_Commands)("Normal")
Return


Label HowAreYou
	SendCommand(Slot_Text)("How Are You")
	Send
	SlotText(Slot_Text) = ""
Return
Label DateAndTime
	SendCommand(Slot_Text)("What is Date And Time?")
	Send
	SlotText(Slot_Text) = ""
Return


'BOOKMARKS 

'EDITEDLINES 

