View previous topic :: View next topic |
Author |
Message |
detheater Expert Cheater
Reputation: 0
Joined: 07 Apr 2007 Posts: 238
|
Posted: Tue Nov 27, 2007 10:43 pm Post subject: Send keys? {delphi} |
|
|
hey, i was wondering on how i could make it so lets say, if i click a button, i will type something like if i click a button it would press g. i have heard about Sendinput() but what do i do with this? do i use like Sendinput(aaaaa); or something? because i tried and it dosent work... it says there is an error in scripting... help??
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Wed Nov 28, 2007 1:34 pm Post subject: |
|
|
Did you try:
Code: |
SendInput('aaaaa');
|
?
_________________
|
|
Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
|
Back to top |
|
 |
Lewiathan How do I cheat?
Reputation: 0
Joined: 06 Dec 2007 Posts: 5
|
Posted: Thu Dec 06, 2007 1:14 pm Post subject: |
|
|
My proposition:
Code: | function SendMess(WindowCaption:String;Text:String):Boolean;
var
i:Integer;
hwnd:THandle;
begin
Result:=False;
hwnd:=FindWindow(NULL,WindowCaption);
if hwnd = Null then
begin
Result:=False;
Exit;
end;
SendMessage(Handle,WM_ACTIVATE,1,1);
for i:=1 to length(Text) do
begin
SendMessage(Handle,WM_CHAR,word(Text[i]),1);
end;
end; |
|
|
Back to top |
|
 |
|