Author Topic: Running A Random HotKey  (Read 1785 times)

VoidingNixx

  • Newbie
  • *
  • Posts: 3
Running A Random HotKey
« on: May 01, 2020, 06:27:42 PM »
So, I am trying to do something similar to the 'Play Random Sound' only with HotKeys.  I would like to setup VoiceAttack to run a random HotKey within a range (ie. CTRL+Shift+1 <---> CTRL+Shift+9) when a particular voice command is picked up.  Is there a way to accomplish this?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Running A Random Hot-Key
« Reply #1 on: May 01, 2020, 06:31:06 PM »
You could use the "{TXTRANDOM:}" token, combined with the "Quick Input" action, or a variable hotkey keypress.

If you're only randomizing a numeric element, the "{RANDOM:}" token may be more appropriate (if the randomization is to occur between a contiguous set of numbers).

VoidingNixx

  • Newbie
  • *
  • Posts: 3
Re: Running A Random Hot-Key
« Reply #2 on: May 01, 2020, 06:34:08 PM »
You could use the "{TXTRANDOM:}" token, combined with the "Quick Input" action, or a variable hotkey.

If you're only randomizing a numeric element, the "{RANDOM:}" token may be more appropriate (if the randomization is to occur between a contiguous set of numbers).

Thanks for that info.  I have not used these options in the past and am not very familiar with them.  Is there any documentation which covers this in a bit more detail?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Running A Random HotKey
« Reply #3 on: May 01, 2020, 06:41:31 PM »
Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer.


If you are unfamiliar with the more advanced features of VoiceAttack, the "Quick Input" action will likely be the simplest to use, as it does not require setting any variables beforehand.

Use the search feature of your PDF viewer to find these section: "'Quick Input'" , "Quick Input, Variable Keypress and Hotkey Key Indicators", "Text (and Text-To-Speech) Tokens" (which actually provides an example of using the "{RANDOM:}" token), and its subsection on the "{TXTRANDOM:value}" token.

VoidingNixx

  • Newbie
  • *
  • Posts: 3
Re: Running A Random HotKey
« Reply #4 on: May 01, 2020, 06:50:09 PM »
Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer.


If you are unfamiliar with the more advanced features of VoiceAttack, the "Quick Input" action will likely be the simplest to use, as it does not require setting any variables beforehand.

Use the search feature of your PDF viewer to find these section: "'Quick Input'" , "Quick Input, Variable Keypress and Hotkey Key Indicators", "Text (and Text-To-Speech) Tokens" (which actually provides an example of using the "{RANDOM:}" token), and its subsection on the "{TXTRANDOM:value}" token.

Alright, found it.  Used the Quick Input.  Works beautifully.  Thanks Pfeil for letting me know where to look.