Author Topic: How to detect listening state  (Read 1471 times)

filthymanc

  • Newbie
  • *
  • Posts: 4
How to detect listening state
« on: November 07, 2023, 03:09:22 PM »
Hi,
I'd like to run a command that can detect the current listening state of VA.

For example, if I push a button, I want to first detect if VA is listening or not, then, dependant on whether VA is listening or not, would like to stop or allow that command from continuing.

This is in a similar way to the detecting a device state in the conditional block commands.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4781
  • RTFM
Re: How to detect listening state
« Reply #1 on: November 07, 2023, 03:13:50 PM »
You'll want to have a look at the "Text (and Text-To-Speech) Tokens" section of the documentation (press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer)

There are quite a few state tokens, including those that return the status of features like the listening state.


These topics may also be of use, in addition to the official documentation:
Control flow (If, Else, ElseIf, Loop, Jump) basics
Variables and tokens summed up

filthymanc

  • Newbie
  • *
  • Posts: 4
Re: How to detect listening state
« Reply #2 on: November 07, 2023, 03:15:09 PM »
Ahhh yes. OK, will have a look.
Thanks,

filthymanc

  • Newbie
  • *
  • Posts: 4
Re: How to detect listening state
« Reply #3 on: November 07, 2023, 03:30:09 PM »
Bingo

{STATE_LISTENING} - This token tests to see if VoiceAttack is, 'listening'. If, 'listening' is on, the replaced value will be "1". If, 'listening' is off, the replaced value will be "0".