Author Topic: individual commands work but combination does not  (Read 897 times)

skypickle

  • Newbie
  • *
  • Posts: 7
individual commands work but combination does not
« on: January 20, 2025, 09:41:28 PM »
I want voice attack to resize and reposition a window in a game from its default to another location.
I have constructed three commands each with its own keyboard shortcut and in the propers equence, the window is moved as I wish. These are:

-move1(grab left window margin and move left window margin further to the right)
move mouse cursor to 2208,927
hold left mouse btn down
move mouse to 2971,927
release mouse btn

-move2 (move top window border down  to reduce size)
move mouse cursor to 3376,787
hold left mouse btn down
move mouse cursor to 3376,2082
release mouse btn

-move3 (drag window up)
move mouse btn to 3376,2093
hold mouse btn down
move mouse cursor to 3376,1052
release mouse btn

I can execute these individually either by voice or hotkey.
But when I create a command consisting of all three pieces of code in sequence, only the first gets executed.
I need to put a 1/2 second pause in between each segment for all of them to execute. Even a 0.1 second delay is not enough.. Why is that?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2846
Re: individual commands work but combination does not
« Reply #1 on: January 21, 2025, 09:07:53 AM »
The game polls input (mouse, keyboard) at a certain number of times per second.  If the input actions are occurring too quickly, the game simply will not see that input states have changed.  The game may see some actions, but not others if they are executed directly in sequence without delay.

That said, I'm surprised the individual commands are working without some level of pause between the individual actions.  Apparently, there's some level of delay needed between releasing the mouse button and (probably) the next hold.  The amount of time needed will vary from system to system and from game to game.  Some games will require more time, some less- the values may be different on my machine.  Hope that makes sense.

On a side note, when you are executing by individual commands, there is a delay.  YOU are the delay.  We don't realize it, but we're just not that fast (well - not as fast as a computer) ;)

skypickle

  • Newbie
  • *
  • Posts: 7
Re: individual commands work but combination does not
« Reply #2 on: January 22, 2025, 10:50:09 AM »
thank you for the reply