Author Topic: Looping Help Required please  (Read 1956 times)

Khalarin

  • Newbie
  • *
  • Posts: 13
Looping Help Required please
« on: April 01, 2020, 04:35:11 AM »
Hi peeps, first post here, I have tried looking found something close but no cigar.

What I'm trying to do is start a loop that holds a key for x seconds then releases, a pause of y seconds, that repeats until I give another voice command. Or a specific number of loops.

Been a few years since I've done any coding so a little rusty any help or pointers would be very much appreciated.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Looping Help Required please
« Reply #1 on: April 01, 2020, 09:42:31 AM »
What have you tried so far?

The documentation on loops can be found in the "'Add a Loop Start'" subsection of the "‘Other Stuff’ Screens" section of VoiceAttackHelp.pdf (press F1 while VoiceAttack has focus to open it in your default PDF viewer).

However, this can be done without using loop actions, as you can use the "Repeating" option of a command combined with a keypress action (with its "Hold down for seconds." option set to the amount of time you want the key to be pressed), and a pause action.

To stop the command from another command, you can use the "Stop Another Command" action, which, as the name implies, does exactly that.

You'll also want to have another keypress action in the command that stops the other command that releases the key, in case it's down when the command is stopped (very few applications respond to releasing a key that was already released, so that's generally not an issue).

Khalarin

  • Newbie
  • *
  • Posts: 13
Re: Looping Help Required please
« Reply #2 on: April 01, 2020, 10:00:12 AM »
Oh hell that was much easier to do without looping, and using a second command to stop it.

Should have remembered "Keep It Simple Stupid"

Thank you =)