| View previous topic :: View next topic |
| Author |
Message |
Travis13 Expert Cheater
Reputation: 0
Joined: 17 Feb 2007 Posts: 199
|
Posted: Tue Nov 11, 2008 11:16 pm Post subject: [C++] How to attach to a process? |
|
|
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
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  |
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Tue Nov 11, 2008 11:35 pm Post subject: |
|
|
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 |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Fri Nov 14, 2008 2:34 am Post subject: |
|
|
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 |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Nov 14, 2008 2:40 am Post subject: |
|
|
| FindWindow returns a handle to the window, you mean, not the process itself.
|
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Fri Nov 14, 2008 2:43 am Post subject: |
|
|
| 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 |
|
 |
|