I'm trying to get a timed 'Yes' or 'No' response after a voice prompt, but it's not working as expected. Code follows:
Say, 'Would you like a system report' (and wait until it completes)
Set small int (condition)
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{EXP:'{DICTATION:SPACE0}'<>'yes' OR '{DICTATION:SPACE0}'<>'no' OR {SMALL:x} <> 0}] Equals '1'
Clear Dictation Buffer
Set small int (condition)
- value as decremented by 1
Pause 1 second
End Loop
Stop Dictation Mode
Begin Small Integer Compare :
Begin Text Compare : [{DICTATION:SPACE0}] Equals 'yes'
Execute command, 'understood' (and wait until it completes)
Execute command, 'System report' (and wait until it completes)
Else If Text Compare : [{DICTATION:SPACE0}] Equals 'no'
Execute command, 'understood' (and wait until it completes)
Say, 'Report cancelled.' (and wait until it completes)
Else
Say, 'Invalid command. You may request a system report later if needed.' (and wait until it completes)
End Condition
Else
Say, 'Report cancelled.' (and wait until it completes)
End Condition