Author Topic: Wait For Response Test ?  (Read 1675 times)

scottb613

  • Newbie
  • *
  • Posts: 32
Wait For Response Test ?
« on: September 10, 2018, 05:40:39 AM »
Hi Folks,

RE: Checklists

Been working on a profile using your new “wait for response” command...

This command has a timeout and sets a VAR to whatever the spoken response is...

What I would like to do is test to see if the proper spoken response was given - if no response is given before the timeout - the code will just play a beep and query the user with the same checklist item over again...

What’s the value of the VAR in the “wait for response” if no response is given by the user ? I tried setting the same VAR to zero before the item loop - but after using the same VAR in the “wait for response” command it no longer appears to be zero - without a response...

The gist here - is it reads a checklist item that requires a verbal response from the user - if no response is given - it reads the same checklist item over again... If the proper response is given - continue with the flow...

Thanks !

Regards,
Scott

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Wait For Response Test ?
« Reply #1 on: September 10, 2018, 12:01:27 PM »
The documentation states:
Quote from: VoiceAttackHelp.pdf page 81
If the timeout period expires, the action will continue and the value placed in the indicated text variable will be, Not Set.

In VoiceAttack "Not Set" represents NULL, which essentially means the variable has not been initialized and doesn't exist; For a string, this is not the same as ""(blank), which means the variable has been initialized and exists, but contains no character data.

If you're comparing text to text, you'd have to compare to a literal "Not Set", E.G.
Code: [Select]
Begin Text Compare : [~VAR] Equals 'Not Set'
End Condition

However, you can also check whether the variable has been set or not:
Code: [Select]
Begin Text Compare : [~VAR] Has Not Been Set
End Condition
Which is the preferable option(as the first example will also match "Not Set" if you were to manually set the variable to that string).