Registriert seit: 2. Dez 2009
Ort: München
320 Beiträge
Lazarus
|
Re: Keybinder - GTA SA
14. Feb 2010, 22:45
Zitat von Millencolin:
ja ich kenne mich mit tastensimulationen aus^^ is kein neugebiet
Na dann,...
Delphi-Quellcode:
//-- EDIT: procedure SendText(ptrData: Pointer; cbLen: Integer);
procedure SendText(ptrData: Pointer);
var
ptrByte: PByte;
bShift: Boolean;
begin
ptrByte := ptrData;
while ptrByte^ <> 0 do begin
bShift := False;
if ((ptrByte^ > $40) and (ptrByte^ < $5B) ) then begin
bShift := True;
keybd_event(VK_SHIFT, 0, 0, 0);
end;
if ((ptrByte^ > $60) and (ptrByte^ < $7B)) then begin
keybd_event(ptrByte^ - $20, 0, 0, 0);
keybd_event(ptrByte^ - $20, 0, KEYEVENTF_KEYUP, 0);
end else begin
keybd_event(ptrByte^, 0, 0, 0);
keybd_event(ptrByte^, 0, KEYEVENTF_KEYUP, 0);
end;
if bShift then
keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0);
inc(ptrByte);
end;
end;
begin
SendText(PChar('Hello world '));
end.
Lanthan Astat 06810110811210410503210511511603209711003210010110 9032084097103
03211611111604403209711003210010110903210010510103 2108101116122
11610103209010110510810103206711110010103210511003 2068101108112
10410503210310111509910411410510109810111003211910 5114100046
|
|
Zitat
|