I just wanted to post this in case others might have use for it. In one of my profiles I give the user the option to specify whether or not he wants to use a keypress (or combination keypress) to toggle VA listening (I'm trying to minimize the amount of time the user must directly interface with VA). In this case it would be useful to be able to set as well as check the value of the the profile's "Override Recognition Global Hotkey" option based on the user's input.
Since this type of option does not currently exist (and
one of my feature requests somewhat addresses this) I've resorted to the following workaround:
The user is queried about enabling/disabling a keypress to make VA listen, and the result is stored in "voiceattack listen button." The following command is executed by the keyboard shortcut [Left Ctrl+Num7].
Begin Text Compare : [voiceattack listen button] Equals '1'
Start Loop While : ([{STATE_KEYSTATE:NUM7}] Equals '1' AND [{STATE_KEYSTATE:LCTRL}] Equals '1')
Begin Text Compare : [{STATE_LISTENING}] Equals '0'
Execute command, 'Start Listening' (and wait until it completes)
End Condition
End Loop
Execute command, 'Stop Listening' (and wait until it completes)
End Condition
So while LCtrl and Num7 are simultaneously pressed the command will loop through the state checks and activate listening without completely clogging the event log with a ton of "listening resumed" statements (yes this can be turned off by running in "Quiet Mode" but that's not the point here). When either key is released VA goes back to not listening.