Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Release] Auto Spammer - Møller
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
jongwee
Moderator
Reputation: 0

Joined: 28 Jun 2006
Posts: 1388
Location: Singapore

PostPosted: Thu Nov 29, 2007 7:07 am    Post subject: Reply with quote

Hmm... Keybd_event.... Nevertheless, good work.
_________________
Back to top
View user's profile Send private message MSN Messenger
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Thu Nov 29, 2007 8:48 am    Post subject: Reply with quote

(no, no Keybd_event)

Code:
Hell:
Sendkeys "Spam~"
DoEvents
Goto Hell


it'll say too fast Sad
my point is that "~" = vbKeyReturn or {ENTER}

_________________
Get kidnapped often.
Back to top
View user's profile Send private message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Fri Nov 30, 2007 5:24 am    Post subject: Reply with quote

rEakW0n wrote:

oh I forgot to say that this way is in delphi^^

or you can simple use sendkeys Oo

Code:

procedure SimulateKeyDown(Key : byte);
begin
 keybd_event(Key, 0, 0, 0);
end;
 
procedure SimulateKeyUp(Key : byte);
begin
 keybd_event(Key, 0, KEYEVENTF_KEYUP, 0);
end;
 
procedure SimulateKeystroke(Key : byte;
              extra : DWORD);
begin
 keybd_event(Key,
       extra,
       0,
       0);
 keybd_event(Key,
       extra,
       KEYEVENTF_KEYUP,
       0);
end;
 
procedure SendKeys(s : string );
var
 i : integer;
 flag : bool;
 w : word;
begin
//Get the state of the caps lock key
 flag := not GetKeyState(VK_CAPITAL) and 1 = 0;
//If the caps lock key is on then turn it off
 if flag then
  SimulateKeystroke(VK_CAPITAL, 0);
 for i := 1 to Length(s) do begin
  w := VkKeyScan(s[i]);
  //If there is not an error in the key translation
  if ((HiByte(w) <> $FF) and
    (LoByte(w) <> $FF)) then begin
   //If the key requires the shift key down - hold it down
   if HiByte(w) and 1 = 1 then
    SimulateKeyDown(VK_SHIFT);
   //Send the VK_KEY
   SimulateKeystroke(LoByte(w), 0);
   //If the key required the shift key down - release it
   if HiByte(w) and 1 = 1 then
    SimulateKeyUp(VK_SHIFT);
  end;
 end;
//if the caps lock key was on at start, turn it back on
 if flag then
  SimulateKeystroke(VK_CAPITAL, 0);
end;
 
// send string
SendKeys('Delphi Is RAD!');



dosent "keybd_event(VK_RETURN,0,0,0);" only works for windows applications?
(exampel it wont work for Silkroad/maple and stuff include if they dident got GG)

anyway i think
"PostKeyEx32(VK_Return, [], FALSE); "
"PostKeyEx32(ORD('D'), [], FALSE); "
is better


(found it on a swedish site and idk if you can find it somewhere else)
Code:

Type
  TShiftKeyInfo = Record
  shift: Byte;
  vkey : Byte;
  End;
  byteset = Set of 0..7;
Const
  shiftkeys: Array [1..3] of TShiftKeyInfo =
    ((shift: Ord(ssCtrl); vkey: VK_CONTROL ),
    (shift: Ord(ssShift); vkey: VK_SHIFT ),
    (shift: Ord(ssAlt); vkey: VK_MENU ));
Var
  flag: DWORD;
  bShift: ByteSet absolute shift;
  i: Integer;
Begin
  For i := 1 To 3 Do Begin
    If shiftkeys[i].shift In bShift Then
      keybd_event( shiftkeys[i].vkey, MapVirtualKey(shiftkeys[i].vkey, 0), 0, 0);
  End; { For }
  If specialkey Then
   flag := KEYEVENTF_EXTENDEDKEY
  Else
   flag := 0;

  keybd_event( key, MapvirtualKey( key, 0 ), flag, 0 );
  flag := flag or KEYEVENTF_KEYUP;
  keybd_event( key, MapvirtualKey( key, 0 ), flag, 0 );

  For i := 3 DownTo 1 Do Begin
   If shiftkeys[i].shift In bShift Then
    keybd_event( shiftkeys[i].vkey, MapVirtualKey(shiftkeys[i].vkey, 0), KEYEVENTF_KEYUP, 0);
  End; { For }
End; //PostKeyEx32

_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Fri Nov 30, 2007 12:13 pm    Post subject: Reply with quote

I know that it doesn't work in Maple or other games with High GG rev.
But this is not for MS.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites