MS SendInput

The open discussion of hosting, forum, web-sites, community organisation and open voting
User avatar
DGDanforth
Posts: 59
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, CA, U.S.A.
Contact:

Re: MS SendInput

Post by DGDanforth »

My error!
I forgot to do a TranslateKey so that "R" gets mapped into >
It all seems to be working nicely now!
I do a Sleep(130) after a down and Sleep(80) after an up.
Works better than all my previous approaches.
Thank you!
-Doug
User avatar
DGDanforth
Posts: 59
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, CA, U.S.A.
Contact:

Re: MS SendInput

Post by DGDanforth »

One final comment.
The erratic behavior I was experiencing with

Code: Select all

WinApi.keybd_event
was not due to that procedure but rather do to the use of Services.Action which is guaranteed to start "NotBefore" but depending upon other actions can happen far after the designated time.

When I switched to using SendInput I also switched to using

Code: Select all

WinApi.Sleep
which (seemingly) does not suffer from those fluctuations in time.

-Doug
Post Reply