Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #11786
| From | Karl Wochele <kw@ecos-system.invalid> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Sample for SendInput() ? |
| Date | 2018-07-31 07:33 +0200 |
| Organization | solani.org |
| Message-ID | <pjosb3$5ea$1@solani.org> (permalink) |
| References | <pjmtau$dk5$1@news-1.m-online.net> |
Hi Gerhard,
we use this function:
FUNCTION KeyBoard_Event(nKey)
LOCAL aKeys AS ARRAY
LOCAL n AS DWORD
IF IsArray(nKey)
aKeys := nKey
ELSE
aKeys := {nKey}
ENDIF
FOR n := 1 UPTO ALen(aKeys)
keybd_event(aKeys[n],0,0,0)
NEXT n
FOR n := ALen(aKeys) DOWNTO 1
keybd_event(aKeys[n],0,KEYEVENTF_KEYUP,0)
NEXT n
/*
// Simulating a Alt+Tab keystroke
keybd_event(VK_MENU,0xb8,0 , 0); //Alt Press
keybd_event(VK_TAB,0x8f,0 , 0); // Tab Press
keybd_event(VK_TAB,0x8f, KEYEVENTF_KEYUP,0); // Tab Release
keybd_event(VK_MENU,0xb8,KEYEVENTF_KEYUP,0); // Alt Release
// Simulating a Ctrl+A keystroke
keybd_event(VK_CONTROL,0x9d,0 , 0); // Ctrl Press
keybd_event(VkKeyScan(‘A’),0x9e,0 , 0); // ‘A’ Press
keybd_event(VkKeyScan(‘A’),0x9e, KEYEVENTF_KEYUP,0); // ‘A’ Release
keybd_event(VK_CONTROL,0x9d,KEYEVENTF_KEYUP,0); // Ctrl Release
*/
RETURN NIL
HTH
Karl
Am 30.07.2018 um 13:38 schrieb Gerhard Bunzel:
> Hello,
>
> for a phone dial by our app, we have to do a keyboard simulation.
> Therefor I found the WIN32 function SendInput(). Has somebody a sample
> with VO to do this?
>
> Thanks in advance.
>
> Best regards
>
> Gerhard Bunzel
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Sample for SendInput() ? Gerhard Bunzel <g.bunzel@domonet.de> - 2018-07-30 13:38 +0200
Re: Sample for SendInput() ? "Jamal" <nospam@example.com> - 2018-07-30 12:56 -0400
Re: Sample for SendInput() ? Gerhard Bunzel <g.bunzel@domonet.de> - 2018-07-31 11:57 +0200
Re: Sample for SendInput() ? Karl Wochele <kw@ecos-system.invalid> - 2018-07-31 07:33 +0200
Re: Sample for SendInput() ? Gerhard Bunzel <g.bunzel@domonet.de> - 2018-07-31 12:04 +0200
Re: Sample for SendInput() ? "Karl-Heinz" <invalid@invalid.invalid> - 2018-07-31 15:59 +0200
Re: Sample for SendInput() ? "Karl-Heinz" <invalid@invalid.invalid> - 2018-07-31 16:11 +0200
Re: Sample for SendInput() ? "Jamal" <noooospam@example.com> - 2018-07-31 15:00 -0400
Re: Sample for SendInput() ? Gerhard Bunzel <g.bunzel@domonet.de> - 2018-08-02 09:00 +0200
csiph-web