Author Topic: Command confirmation (Wait for spoken response) HELP NEEDED  (Read 1052 times)

Lord Naton

  • Newbie
  • *
  • Posts: 2
Command confirmation (Wait for spoken response) HELP NEEDED
« on: August 26, 2021, 07:13:27 AM »
I´m fairly new to VoiceAttack and I´m trying to set up some commands to require confirmation.
So what I did was the following:

Set Text value "Confirmation" to " " (blank)

Wait for spoken response "Yes;Confirm;No" which is placed into "Confirmation"

Begin Text Compare "Confirmation" equals "Confirm"

Executes command

Else if "Confirmation" equals "Yes"

Executes command

Else if "Confirmation" equals "No"

Plays voiceline saying that Command was aborted

Else

Plays voiceline saying that confirmation failed

End conditional block

This is however not working, so, what did I do wrong?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Command confirmation (Wait for spoken response) HELP NEEDED
« Reply #1 on: August 26, 2021, 10:55:56 AM »
On the surface that looks correct. What, specifically, isn't working? Does it always play the "voiceline saying that confirmation failed"?

You can right-click the action list, choose "Copy All as Text" from the context menu, then paste here into a code block (click the # button), rather than manually transcribing all that (which also makes sure no potentially significant details are lost)


As an aside, if both "Confirm" and "Yes" are intended to trigger the same command, you can use the condition builder to merge that into an "OR" condition (right-click the first condition and choose "Edit With Condition Builder")

Also meant to point out that setting the "Confirmation" variable beforehand is redundant: The "Wait For Spoken Response" action will overwrite that value (which would also create the variable, if it doesn't exist already) regardless of which options are set in that action.
« Last Edit: August 26, 2021, 12:48:08 PM by Pfeil »

Lord Naton

  • Newbie
  • *
  • Posts: 2
Re: Command confirmation (Wait for spoken response) HELP NEEDED
« Reply #2 on: August 26, 2021, 12:40:53 PM »
I found the error.... A semicolon was missing... Thank you for your help