MS SendInput

The open discussion of hosting, forum, web-sites, community organisation and open voting

Re: MS SendInput

Postby DGDanforth » Sun Jul 16, 2017 11:13 am

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: 40
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, CA, U.S.A.

Re: MS SendInput

Postby DGDanforth » Mon Jul 17, 2017 5:28 am

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
User avatar
DGDanforth
 
Posts: 40
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, CA, U.S.A.

Previous

Return to Brainstorming

Who is online

Users browsing this forum: No registered users and 1 guest

cron