PostMessage + 5 Bypass

Alright, I'm havin a bit of trouble and I really don't have the time to keep sitting down trying to figure it out because of college and work. I've spent a load of time already, and figured it was time to ask for a bit of help.
Note: In C#, but I'll take any language and convert it if I have to.
I need to send certain key presses to MS. However, nothing I do seems to actually send the "Key" to MS, but instead just the string. I've been using SendInput and other relative functions, but nothing works. I've been told to try DirectInput, but when screwing with that I noticed it's more for READING keypresses/events, than actually sending them.
So, does anyone know to send readable key presses to MS? If not, that's fine, I can figure it out, it's just going to take a LOT longer than I would like.
Feedback Score 0 PostMessage + 5 Bypass
Intel Corie i7 920 OC @ 4.0GHz + Prolimatech Megahalems CPU Cooler with 2 Fans @ 1200RPMs
Evga X58 SLI Classified
Evga GTX 470 FTW for 3 Way SLI + Evga GT 9800 GT for PhysX
Corsair Dominator GT 1600MHz DDR3 6GB
Corsair HX1000
Corsair Obsidian 800D
Kingston 64GB SSD for OS + Western Digital Caviar Black 1TB for Storage
Alienware OptX 3D Monitor + Nvidia 3D Bundle
Razer Lycosa, Mamba, Sphex, Mako, & Megalodon
PostMessage only sends the string/character value, though. Not the actual keypress. So regardless of what bypass is used, I can't see that working in any way, shape, or form.Originally Posted by KittyKittyBoy17
[Dear Visitor, you're restricted from viewing links until you are registered & logged on.
Click Here To Register TodayPostMessage + 5 Bypass
Feedback Score 2 (100%) You obviously don't know much about programing. PostMessage is exactly what you are looking for.Originally Posted by TGForums
[Dear Visitor, you're restricted from viewing links until you are registered & logged on.
Click Here To Register TodayPostMessage only sends the string/character value, though. Not the actual keypress. So regardless of what bypass is used, I can't see that working in any way, shape, or form.
It's simple enough to achieve what you want, just send the WM_KEYDOWN message to MapleStory via it's windows process name (wndproc for short)
There are several ways to send a PostMessage instruction to it's wndproc, and one of which I will demonstrate (which is in C#)
First of all you will need to import the following into your project imports "System.Runtime.InteropServices;" This allows you to import and use dynamic link library files (also known as dll's).
Second you will need to import the FindWindow function and the PostMessage function which will be shown bellow;
//////////////////////////////////
//////// FINDWINDOW /////////
//////////////////////////////////
//////////////////////////////////Code:[DllImport("user32.dll", SetLastError = true)] static extern IntPtr FindWindow( string lpClassName, string lpWindowName); IntPtr hWnd = FindWindow( null, "MapleStory");
//////// POSTMESSAGE ////////
//////////////////////////////////
Thirdly you need to define the WM_KEYDOWN event. Add this piece of code to your form coding (under public partial class)Code:[return: MarshalAs(UnmanagedType.Bool)] [DllImport("user32.dll", SetLastError = true)] static extern bool PostMessage( IntPtr hWnd, uint Msg, int wParam, int lParam);
Now that we've got all the functions and imports sorted, all thats needed to do is call the PostMessage event using our parameters. For an example of the usage of PostMessage I will attempt to send the "A" Key to MapleStory' wndproc, the following is done so like:Code:const int WM_KEYDOWN = 0x100;
Here I will list each Parameter of the PostMessage event so you can get a better understanding.Code:PostMessage(hWnd, WM_KEYDOWN, 0x41, 0x1e0001);
hWnd - Is the destination parameter (basically where the message will be delivered to in la mans terms)
WM_KEYDOWN - As stated before this is the KEY_DOWN event, it signifies a key being held down. Alternatively you can also use the KEY_PRESS event.
0x41 - Is the wParam which signifies what key is being used
0x1e0001 - Is the lParam which signifies what key is being used
You can find a list of wParameters and lParameters here:
[Dear Visitor, you're restricted from viewing links until you are registered & logged on.
Click Here To Register Today
Ofcourse none of the above will work if you have not attached your program to MapleStory' wndproc, or in this case "hWnd". To do this, simply put the following code in your form_load events:
An alternative to this would be to put "MapleStoryClass" instead of MapleStory. If you are using "MapleStory" as the window name, you will only be able to use your program if you start it up before you start MapleStory. Using "MapleStoryClass" as the window to find will allow you to open up your program after MapleStory has been opened.Code:FindWindow(null, "MapleStory");
Thats all I have to say.
Last edited by Viera; 01-25-2010 at 05:23 AM.
TGForums(01-25-2010)
I understood all of that before lol, but thankyou for the time you spent in that response. And I figured PostMessage was only a char/string oriented function; not a keypressing one. I previously believed it was similar to SendWait, but then again I hadn't really looked into it. Sorry for my ignorance and thank you for your help.Originally Posted by Viera
[Dear Visitor, you're restricted from viewing links until you are registered & logged on.
Click Here To Register TodayYou obviously don't know much about programing. PostMessage is exactly what you are looking for.
It's simple enough to achieve what you want, just send the WM_KEYDOWN message to MapleStory via it's windows process name (wndproc for short)
There are several ways to send a PostMessage instruction to it's wndproc, and one of which I will demonstrate (which is in C#)
First of all you will need to import the following into your project imports "System.Runtime.InteropServices;" This allows you to import and use dynamic link library files (also known as dll's).
Second you will need to import the FindWindow function and the PostMessage function which will be shown bellow;
//////////////////////////////////
//////// FINDWINDOW /////////
//////////////////////////////////
//////////////////////////////////Code:[DllImport("user32.dll", SetLastError = true)] static extern IntPtr FindWindow( string lpClassName, string lpWindowName); IntPtr hWnd = FindWindow( null, "MapleStory");
//////// POSTMESSAGE ////////
//////////////////////////////////
Thirdly you need to define the WM_KEYDOWN event. Add this piece of code to your form coding (under public partial class)Code:[return: MarshalAs(UnmanagedType.Bool)] [DllImport("user32.dll", SetLastError = true)] static extern bool PostMessage( IntPtr hWnd, uint Msg, int wParam, int lParam);
Now that we've got all the functions and imports sorted, all thats needed to do is call the PostMessage event using our parameters. For an example of the usage of PostMessage I will attempt to send the "A" Key to MapleStory' wndproc, the following is done so like:Code:const int WM_KEYDOWN = 0x100;
Here I will list each Parameter of the PostMessage event so you can get a better understanding.Code:PostMessage(hWnd, WM_KEYDOWN, 0x41, 0x1e0001);
hWnd - Is the destination parameter (basically where the message will be delivered to in la mans terms)
WM_KEYDOWN - As stated before this is the KEY_DOWN event, it signifies a key being held down. Alternatively you can also use the KEY_PRESS event.
0x41 - Is the wParam which signifies what key is being used
0x1e0001 - Is the lParam which signifies what key is being used
You can find a list of wParameters and lParameters here:
[Dear Visitor, you're restricted from viewing links until you are registered & logged on.
Click Here To Register Today
Ofcourse none of the above will work if you have not attached your program to MapleStory' wndproc, or in this case "hWnd". To do this, simply put the following code in your form_load events:
An alternative to this would be to put "MapleStoryClass" instead of MapleStory. If you are using "MapleStory" as the window name, you will only be able to use your program if you start it up before you start MapleStory. Using "MapleStoryClass" as the window to find will allow you to open up your program after MapleStory has been opened.Code:FindWindow(null, "MapleStory");
Thats all I have to say.
PS: It really had nothing to do with not knowing how to program. It was simply that I didn't know PostMessage because, like I previously stated, I thought it was string/char sending and not the actual key.
EDIT:
Played around with it while in class, got it working. Thank you very much for the help.
Last edited by TGForums; 01-25-2010 at 01:54 PM.
Feedback Score 2 (100%) No problemOriginally Posted by TGForums
[Dear Visitor, you're restricted from viewing links until you are registered & logged on.
Click Here To Register TodayI understood all of that before lol, but thankyou for the time you spent in that response. And I figured PostMessage was only a char/string oriented function; not a keypressing one. I previously believed it was similar to SendWait, but then again I hadn't really looked into it. Sorry for my ignorance and thank you for your help.
PS: It really had nothing to do with not knowing how to program. It was simply that I didn't know PostMessage because, like I previously stated, I thought it was string/char sending and not the actual key.
EDIT:
Played around with it while in class, got it working. Thank you very much for the help.
I remember when I was making my first bot and was having trouble with PostMessage. Ah the good ol' days![]()
It's not my first; normally I'd use SendInput, but I just recently found out that doesn't work for DirectX games, so I needed to find an alternative. And thanks to you finding my stupidity and letting me know that PostMessage wasn't what I was thinking it was (IE. Send, SendWait, etc), I actually managed to get it to work lolOriginally Posted by Viera
[Dear Visitor, you're restricted from viewing links until you are registered & logged on.
Click Here To Register TodayNo problem
I remember when I was making my first bot and was having trouble with PostMessage. Ah the good ol' days
The last bots for MS that I made were roughly 3-years ago and written in C++/Java. Then I moved onto FFXI, and was making bots there for those 3 years, but never had a problem with the automated input until now haha
Thankyou
And PS. I've been using FindWindow(null, "MapleStory"); for a while, and never had a problem with the order of execution. It seems to work fine, at least for me, regardless of the order I start the programs. I wonder what would cause the difference


Bookmarks