![]() |
keybd_event und Sonderzeichen
Hi!
SirThornberry stellt ![]()
Delphi-Quellcode:
procedure EnterText(AText: String);
var lCount : Integer; lScanCode : Smallint; lWithAlt, lWithCtrl, lWithShift : Boolean; begin for lCount := 1 To Length(AText) Do begin lScanCode := VkKeyScan(AText[lCount]); //Ermitteln ob Shift gedrückt wurde lWithShift := lScanCode and (1 shl 8) <> 0; //Ermitteln ob Strg gedrückt wurde lWithCtrl := lScanCode and (1 shl 9) <> 0; //Ermitteln ob Alt gedrückt wurde lWithAlt := lScanCode and (1 shl 10) <> 0; if lWithShift then keybd_event(VK_SHIFT, 0, 0, 0); if lWithCtrl then keybd_event(VK_CONTROL, 0, 0, 0); if lWithAlt then keybd_event(VK_MENU, 0, 0, 0); keybd_event(lScanCode, 0, 0, 0); keybd_event(lScanCode, 0, KEYEVENTF_KEYUP, 0); if lWithAlt then keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); if lWithCtrl then keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); if lWithShift then keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); end; end; Da ich sie leider nicht im Text unterbringen konnte, hier noch ein paar Suchwörter, damit der Thread gut gefunden werden kann: simulieren, Tastendruck, Virtual Key Ciao Frederic [edit=Dax]Doofes Highlighting... Mfg, Dax[/edit] |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:30 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz