Author Topic: Help with command.  (Read 1561 times)

Yilmoto

  • Newbie
  • *
  • Posts: 4
Help with command.
« on: October 04, 2019, 09:02:57 PM »
How do I make a command to hold the "a" key until I press the "k" key, then release the "a" key after?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Help with command.
« Reply #1 on: October 04, 2019, 09:05:25 PM »
You can use a loop for that:
Code: [Select]
Press down A key
Start Loop While :  Keyboard Key 'K' Is Not Pressed
End Loop
Release A key

If you want the A key to be released only after also releasing the K key, you can add another loop:
Code: [Select]
Press down A key
Start Loop While :  Keyboard Key 'K' Is Not Pressed
End Loop
Start Loop While :  Keyboard Key 'K' Is Pressed
End Loop
Release A key

Yilmoto

  • Newbie
  • *
  • Posts: 4
Re: Help with command.
« Reply #2 on: October 04, 2019, 09:09:18 PM »
Thank you.

Yilmoto

  • Newbie
  • *
  • Posts: 4
Re: Help with command.
« Reply #3 on: October 04, 2019, 10:34:11 PM »
How do I make a command to hold the "a" key until I press the "K" key or "I" key or "J" key or "L" key, then release the "a" key after?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Help with command.
« Reply #4 on: October 04, 2019, 10:42:19 PM »
Same as the previous example (in case of the first one), but you can right-click the loop action and choose "Edit With Condition Builder" to add the other keys using the "Add Condition (And)" button (one for each key).

If you want to create the command from scratch instead, you can also choose "Compound Condition Builder (While Loop)" instead of "Single Condition (While Loop)" when adding the loop action.


For more information on VoiceAttack's actions and other possibilities, press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer.