Author Topic: Activate many commands in rapid sequence  (Read 2889 times)

amadeok

  • Guest
Activate many commands in rapid sequence
« on: July 05, 2018, 06:13:04 AM »
Hello,
I'm trying to use VoiceAttack to sostitute keyboard strokes such as "1", "2", "q", ect. While i was sort of able to get them to execute in rapid sequence by lowering the microphone volume, i'd like to know if there is any specific way to do it. The idea is to be able to activate skills and potions in games with microphone input in rapid sequence. For instance i thought this would be possible if there was a limit to how long the microphone input can be, then as soon as that timer runs out the program sends whatever input it received.
Any ideas?
Thanks

peterd

  • Guest
Re: Activate many commands in rapid sequence
« Reply #1 on: July 17, 2018, 02:37:14 PM »
I asked the VA Developer about this last year. The is no high precision timer that I know of in VA that can allow a rapid chain of commands to be fired. For instance I had weapon groups 1 through 6 and needed the input to be precision timed to go 123456 with each number a keyboard down event being pressed/injected into my target process (game) every 57 milliseconds and then when 6 is reached go back to 1 and keep on an endless cycle until I issued a command toggle to stop the rapid fire.

Instead I had to rely on the separate FireControl program which is built on top of the separate AutoHotKey program in order to get that feature. If you know how to program AutoHotKey directly then you can skip the FireControl application itself.

If you don't need what I have described maybe it can still be done in VA and someone else might know how.

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Activate many commands in rapid sequence
« Reply #2 on: July 18, 2018, 11:02:39 AM »
Naturally just processing a command will "eat up" a portion of that 57 ms, so I think you'll need to run the key press commands in parallel to achieve the desired effect. So basically you'd have a central command that runs the loop, handles the pausing, and fires off the separate keypress commands that run in parallel with the central command. Though if you're saying that looping individual key press commands in parallel with pauses does not satisfy what you need you'll probably have to resort to an inline function for more accuracy.

There are folks out there who have developed methods for controlling timing and execution at the millisecond level (in some cases down to microseconds :o). Searching for "C# high precision timer" yields interesting results, including an article (which includes code and examples!) for a Microsecond and Millisecond C# Timer. No promises this will yield the results you want, but it is another path to consider.

Part of me wants to work on a profile that incorporates this functionality...but I have a few other VA projects in the works that I'd like to close out first ;)