Bun venit pe SkullBox!

Bine ai venit, Vizitator. Trebuie să te autentifici sau să îţi creezi un cont.
Ai pierdut sau nu ai primit emailul care conţine codul de activare al contului?

Autentifică-te cu numele de utilizator, parola şi precizează durata sesiunii.
  Pagini: [1]
  Imprimă  
Simulare taste [Delphi]  (Vizualizari 635)
DarkByte
*

Deconectat Deconectat

Mesaje: 2441

WWW
Simulare taste [Delphi], Iun 06, 2008, 20:21

Mentionez ca acest cod nu este facut de mine, eu am facut doar niste modificari pentru cazurile in care trebuie si Shift apasat.

Cod:
procedure SendKeys(WinHandle:Hwnd;Buffer:String);
var I: Integer;
    W: Word;
    D: DWORD;
    P: ^DWORD;
begin
  P:=@D;
  SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT,0,P,0);
  if IsIconic(WinHandle) then
    ShowWindow(WinHandle,SW_RESTORE);
  SetForegroundWindow(WinHandle);
  For I := 1 to Length(Buffer) do begin
    W:=VkKeyScan(Buffer[i]);
    if (Hi(w) and 1 = 1) then
      keybd_event(VK_SHIFT,1,0,0);
    keybd_event(w,0,0,0);
    keybd_event(w,0,KEYEVENTF_KEYUP,0);
    if (Hi(w) and 1 = 1) then
      keybd_event(VK_SHIFT,1,KEYEVENTF_KEYUP,0);
                                  end;
  SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT,0,nil,0);
  SetForegroundWindow(WinHandle);
  SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT,D,nil,0);
end;
Practic, doar alegeti fereastra (ca handle) in care vreti sa "scrieti" si ii dati ce text sa scrie.

Exemplu:
Cod:
SendKeys(Notepad_handle, 'simulated text');
Memorat

Light travels faster than sound. This is why some people appear intelligent until they speak.

Quidquid latinum dictum sit, altum viditur.

SkullAds
Ecspert
ReclAmator
* * * * *
Google AdSense

Gen: Bărbat
Mesaje: Multe

Reclama AdSense,
 

 
   


Pagini: [1]
  Imprimă  
 
Schimbă forumul:  

Ethical hacking and programming community
Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Traducerea în limba română © 2006-2007 www.smf.ro