English
Source / code snippets

Api Control Window Per send Tastatureingabe

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
Tastatureingabe an Fenster oder Control schicken (per API)
kbd_event schickt eine Tastatureingabe an das Control/Fenster, das den Eingabefocus hat
Def @Keybd_event(4)!User32,keybd_event
Diese Vierparameter-Funktion sendet einen Tastendruck an das Fenster/Control, das den Eingabefocus hat.
I1(Param.1 Integer ): Virtueller Tastencode der Taste. Wenn der zweite Parameter verwendet wird,
diesen Parameter auf 0 (null) setzen.
I2(Param.2 Integer ): Hardware Scancode der Taste. Wenn der erste Parameter verwendet wird,
diesen Parameter auf 0 (null) setzen.
L3(Param.3 Longint ): Flags für den Tastendruck...
-> Taste wird gedrückt = $0
-> Taste wird losgelassen = $2
L4(Param.4 Longint ) oder B4(Param.4 Bereich ), hier können zusätzliche Informationen übermittelt werden,
die vom Empfänger mit der API Getmessageextrainfo ausgelesen werden können.
Def @Keybd_event(4)!User32,keybd_event
Windowstyle 31
Windowtitle WordPad steuern
Window 0,0-640,440
Declare Wordpadhandle&
@Winexec(Write.exe,3)

While Wordpadhandle&=0

    Sleep 1000
    Let Wordpadhandle&=@Findwindow(Dokument - WordPad)

Wend

@Keybd_event($12,0,0,0)$12=Scancode von Taste ALT (springt ins Menü)
@Keybd_event(@Ord(D),0,0,0)Taste D drücken
@Keybd_event(@Ord(D),0,2,0)Taste D loslassen
@Keybd_event(@Ord(F),0,0,0)Taste F drücken
@Keybd_event(@Ord(F),0,2,0)Taste F loslassen
@Keybd_event($12,0,2,0)Taste ALT loslassen
@Sendstring(@Getactivewindow(),$Winpath+WIN.INI)
@Keybd_event($0D,0,0,0)$12=Scancode von Taste RETURN
@Keybd_event($0D,0,2,0)Taste RETURN loslassen
 $01 Linke Maustaste VK_LBUTTON
 $02 Rechte Maustaste VK_RBUTTON
 $03 Strg-Unterbrechung VK_CANCEL
 $04 Mittlere Maustaste VK_MBUTTON
 $08 BackSpace VK_BACK
 $09 Tab-Taste VK_TAB
 $0C Entfernen VK_CLEAR
 $0D Return VK_RETURN
 $10 Shift VK_SHIFT
 $11 Strg VK_CONTROL
 $12 Alt / Menü VK_MENU
 $13 Pause VK_PAUSE
 $14 CapsLock VK_CAPITAL
 $1B Esc VK_ESCAPE
 $20 Space VK_SPACE
 $21 BildHoch VK_PRIOR
 $22 BildRunter VK_NEXT
 $23 Ende VK_END
 $24 Pos1 VK_HOME
 $25 Links VK_LEFT
 $26 Hoch VK_UP
 $27 Rechts VK_RIGHT
 $28 Runter VK_DOWN
 $29 Select VK_SELECT
 $2A Druck VK_PRINT
 $2B Execute VK_EXECUTE
 $2C Druck VK_SNAPSHOT
 $2D Einfg VK_INSERT
 $2E Entf VK_DELETE
 $2F Hilfe VK_HELP
 $30 Taste 0 VK_0
 $31 Taste 1 VK_1
 $32 Taste 2 VK_2
 $33 Taste 3 VK_3
 $34 Taste 4 VK_4
 $35 Taste 5 VK_5
 $36 Taste 6 VK_6
 $37 Taste 7 VK_7
 $38 Taste 8 VK_8
 $39 Taste 9 VK_9
 $41 Taste A VK_A
 $42 Taste B VK_B
 $43 Taste C VK_C
 $44 Taste D VK_D
 $45 Taste E VK_E
 $46 Taste F VK_F
 $47 Taste G VK_G
 $48 Taste H VK_H
 $49 Taste I VK_I
 $4A Taste J VK_J
 $4B Taste K VK_K
 $4C Taste L VK_L
 $4D Taste M VK_M
 $4E Taste N VK_N
 $4F Taste O VK_O
 $50 Taste P VK_P
 $51 Taste Q VK_Q
 $52 Taste R VK_R
 $53 Taste S VK_S
 $54 Taste T VK_T
 $55 Taste U VK_U
 $56 Taste V VK_V
 $57 Taste W VK_W
 $58 Taste X VK_X
 $59 Taste Y VK_Y
 $5A Taste Z VK_Z
 $5B  VK_LWIN
 $5C  VK_RWIN
 $5D  VK_APPS
 $60 Num Tastenblock 0 VK_NUMPAD0
 $61 Num Tastenblock 1 VK_NUMPAD1
 $62 Num Tastenblock 2 VK_NUMPAD2
 $63 Num Tastenblock 3 VK_NUMPAD3
 $64 Num Tastenblock 4 VK_NUMPAD4
 $65 Num Tastenblock 5 VK_NUMPAD5
 $66 Num Tastenblock 6 VK_NUMPAD6
 $67 Num Tastenblock 7 VK_NUMPAD7
 $68 Num Tastenblock 8 VK_NUMPAD8
 $69 Num Tastenblock 9 VK_NUMPAD9
 $6A Multiplikationstaste (*) VK_MULTIPLY
 $6B Additionstaste (+) VK_ADD
 $6C Separatortaste VK_SEPARATOR
 $6D Subtraktionstaste (-) VK_SUBTRACT
 $6E Dezimaltaste (,) VK_DECIMAL
 $6F Divisionstaste (/) VK_DIVIDE
 $70 F1 VK_F1
 $71 F2 VK_F2
 $72 F3 VK_F3
 $73 F4 VK_F4
 $74 F5 VK_F5
 $75 F6 VK_F6
 $76 F7 VK_F7
 $77 F8 VK_F8
 $78 F9 VK_F9
 $79 F10 VK_F10
 $7A F11 VK_F11
 $7B F12 VK_F12
 $7C F13 VK_F13
 $7D F14 VK_F14
 $7E F15 VK_F15
 $7F F16 VK_F16
 $80 F17 VK_F17
 $81 F18 VK_F18
 $82 F19 VK_F19
 $83 F20 VK_F20
 $84 F21 VK_F21
 $85 F22 VK_F22
 $86 F23 VK_F23
 $87 F24 VK_F24
font color="#ff8800"> $90 Numlocktaste VK_NUMLOCK
 $91 Rollentaste VK_SCROLL
 
07/15/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.162 Views

Untitledvor 0 min.
AndreasS12/08/18
Torben Nissen02/07/17
iF01/11/16
Ernst03/02/15
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie