What I'd like to do is output the voice text that is not in my object list to a "chat box" so that I can dictate to the box. Here's what I tried.
Code: Select all
OnRecognition(StreamNum,StreamPos,RecogType,Result){
sText:= Result.PhraseInfo().GetText() ; Grab the text we just spoke and go to that subroutine
;pspeaker.Speak("You said " sText)
;addMsgBox, Command is %sText%
if (Responses[sText]) ;If text is found as a key in the object then...
{
gosub % Responses[sText] ;jump to the gosub ;This works for all my commands
}
else
{
Sendinput, %sText% ; attempt to send text to chat message box
}
ObjRelease(sText)
Ultimately I'll set a toggle and only sendinput if the chat box is active.
This line is not working "Sendinput, %sText% ; attempt to send text to chat message box'
the complete script is attached, it controls the wahoo RGT cycling app using a head set. Most of the commands are for a 2560x1440 screen.
Thanks
[Mod actions: Moved from main section which is for v2, and added [code][/code] tags. Please use them yourself when posting code.]