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 


[C++] How to attach to a process?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Travis13
Expert Cheater
Reputation: 0

Joined: 17 Feb 2007
Posts: 199

PostPosted: Tue Nov 11, 2008 11:16 pm    Post subject: [C++] How to attach to a process? Reply with quote

hey guys......im interested into making a simple maplestory bot eventually with like auto attack and basic shyt.........and for starters i was to learn how i would connect to a process (example. maplestory) and yeah.........basically wat im gonna try to do first is make a quick ad killer.......by attaching to maplestory.exe and forcing my program to press alt+f4 or esc.....or w.e........i jsut need to know how to connect to maplestory in terms of creating a future bot Smile

thanks, and btw i dont need someone to be like (just use createproccesid) or something random like that and not explain how to use it or w/e........i need like an example source code?

thanks again and sorry for sounding like such a leecher

_________________
Learning C++, trying, failing, never gonna give up tho Razz
Back to top
View user's profile Send private message MSN Messenger
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Tue Nov 11, 2008 11:35 pm    Post subject: Reply with quote

first of all, you don't need to attach you're bot to maplestory
since you're sending keys or whatever to the window using PostMessage
for example if you want to send 'Z' key for auto loot just send key_down message including the 'z' virtual key code and you're done
Code:

_PostMessage(hWnd,WM_KEYDOWN,0x5A /* 0x5A = 'z' */, (MapVirtualKey(0x5A,0) << 16));

also u can see i used _PostMessage and not the regular PostMessage API
_PostMessage is a bypassed api for PostMessage which hops the hook that GG created.
and for your other question about how to close ms i guess you can send WM_CLOSE / WM_QUIT message to the window (never tried it b4)

_________________
Stylo
Back to top
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Fri Nov 14, 2008 2:34 am    Post subject: Reply with quote

Perhaps learn something about coding before jumping into it all...

To make the worlds most very basic bot, you will need to understand how the following are used.
Code:

FindWindow //Get's the program's handle
PostMessage //Sends Maple a message... Used for keypresses
SendMessage // Sends Maple a message... Can be used to kill Maple...


MSDN is a vital resource. Same as google.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri Nov 14, 2008 2:40 am    Post subject: Reply with quote

FindWindow returns a handle to the window, you mean, not the process itself.
Back to top
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Fri Nov 14, 2008 2:43 am    Post subject: Reply with quote

slovach wrote:
FindWindow returns a handle to the window, you mean, not the process itself.

Yeah, sorry. I'm terrible at explaining things...
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
Page 1 of 1

 
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