Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11786

Re: Sample for SendInput() ?

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Karl Wochele <kw@ecos-system.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Sample for SendInput() ?
Date Tue, 31 Jul 2018 07:33:22 +0200
Organization solani.org
Lines 54
Message-ID <pjosb3$5ea$1@solani.org> (permalink)
References <pjmtau$dk5$1@news-1.m-online.net>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace solani.org 1533015203 5578 127.0.0.43 (31 Jul 2018 05:33:23 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 31 Jul 2018 05:33:23 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
In-Reply-To <pjmtau$dk5$1@news-1.m-online.net>
Cancel-Lock sha1:JF9J4gNKQ7QuBExrc5hUYmP739M=
X-User-ID eJwFwQERADEIAzBLG4UW5PzB8C/hkwAvW86gx8YSpogRuZ6pa++M6QrfQaNPdb3K8lHDQfsB98UPyA==
Xref csiph.com comp.lang.clipper.visual-objects:11786

Show key headers only | View raw


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


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