Author Topic: Spamming key commands resulting in keypress innacuracy  (Read 4996 times)

Rayezilla

  • Posts: 2
Spamming key commands resulting in keypress innacuracy
« on: June 24, 2016, 10:42:03 PM »
Hey, I'm Ray. First and foremost, thank you for making and supporting this software. I like it a lot!

I'm having a problem using VoiceAttack with Star Trek Online. It's probably user error and not a coding issue. I have a keybind which is like this:

voice command: disabled
When I press this key: 1 (passthrough disabled)
execute this series of commands:
keypress 1 for 0.15s
keypress  shift 2 for 0.15s
keypress  shift 3 for 0.15s
keypress 4 for 0.15s
keypress 5 for 0.15s

When I press 1 repeatedly, the output looks like this: 1@#451@#451@#45 11@345123451@#45

See the 2's and 3's in there? Is there a way I can code this so that they don't show up? Or is there a better way for me to write this? I want to be able to press the button several times and have all numbers spit out accurately. Thank you!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Spamming key commands resulting in keypress innacuracy
« Reply #1 on: June 24, 2016, 11:17:52 PM »
I think I can see what is going on.  It is a case of asynchronous commands stepping on each other.  The reason I say that is because I tried it out and I was getting $ and % as well. 

Since there is a delay needed in the key presses for the game to pick up the keys, the output is not instant.  The shift key is being held down and released at various times and while it is being either held down or released the macro is being executed again.  So, any time the macros overlap where the shift key is involved, you will get mixed results.  I hope this is making sense... kind of hard to explain ;)  The API respects the keyboard state (both virtual and hardware), so there's no easy way around this one.

The only thing I can suggest that may help in this case is to un-check the box labeled, 'allow other commands to execute while this one is running' on the command screen.  That will prevent your macros from overlapping (well, kinda).  You will also want to get the beta:  http://www.voiceattack.com/beta and check the box on the options screen labeled, 'cancel blocked commands'.  This will keep buffered 'spammed' 1 keys from simultaneously trying to execute when the block is released:

Without 'cancel blocked commands': 1@#451@#451@@###445551@#45511@@###44555
With 'cancel blocked commands': 1@#451@#451@#451@#451@#45

Wondering if 'cancel blocked commands' should be the default from here on out  ???

Rayezilla

  • Posts: 2
Re: Spamming key commands resulting in keypress innacuracy
« Reply #2 on: June 24, 2016, 11:29:03 PM »
ooh i have the beta installed. I will try that check box. Thank you!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Spamming key commands resulting in keypress innacuracy
« Reply #3 on: June 30, 2016, 09:25:01 AM »
The, 'cancel blocked commands' option will be on (selected) by default in the upcoming release.