Author Topic: Howto delay a command while others are running?  (Read 1716 times)

gorgo

  • Guest
Howto delay a command while others are running?
« on: January 25, 2019, 06:24:26 PM »
hello.
Ive used VA for many years and made some simple profiles for games.

Now i try to achieve following:

Say a command.
Wait X seconds while waiting for a spoken word (to execute instructions within that command).
If word is spoken before end of waitingtime, exit loop and execute the command. (waitingtime can be hardcoded).
If not word is spoken before end of waitingtime, exit the loop.

While the above is running other VA commands should be able to run.

Thanks for any help, especially howto write the loop.

regards


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Howto delay a command while others are running?
« Reply #1 on: January 25, 2019, 06:42:11 PM »
The "Wait For Spoken Response" action does pretty much exactly that:
Code: [Select]
Wait for spoken response: 'word'
Begin Text Compare : [~response] Has Not Been Set
    Write [Red] 'Word has not been spoken, exiting' to log
End Condition - Exit when condition met
Write [Blue] 'Word has been spoken' to log

You can set a timeout in the action, if the correct word hasn't been spoken by that time the variable will have a value of "Not Set".

As long as you check the "Allow other commands to execute while this one is running" option, you can run this alongside other commands.


More information on this action can be found on pages 81 and 82 of VoiceAttackHelp.pdf

gorgo

  • Guest
Re: Howto delay a command while others are running?
« Reply #2 on: January 25, 2019, 06:53:01 PM »
thank You for help. :)