Need help with mouse and keyboard input...

07/15/2012 22:43 Freszone#1
A friend of mine asked if I could try to make a simple bot for him. Didn't promise him anything but I'll give it a try.
Bot involves some pixel search what I managed to get working fine, but the biggest problem at the moment is to send keystrokes and mouse input to Conquer window.
This bot will not be for official CO and I know that there would be many much better ways to do this, like a proxy.

The language I am using is C++ and I have tried PostMessage, SendInput, SendMessage, mouse_event and all that stuff but none of them works for CO window... Conquer seems to be blocking those or something... :D All I need is to be able to move/click mouse and send some keystrokes.
So, what should I do? I have basic knowledge of using OllyDbg, done some work with dll's and injection. If someone could give me a tip I would appreciate it.
07/15/2012 22:51 Zeroxelli#2
You need to be running as administrator for that to work, and you also need to grab the window handle of the conquer client.
07/15/2012 23:14 Freszone#3
Thanks, got it working at least a bit :D And I was so stupid that I didn't even check is my Visual Studio running as admin... On my desktop pc what I use the most of the time I have it as admin but on this laptop I apparently didn't :D
07/15/2012 23:20 Zeroxelli#4
Yeah, most people assume you don't need elevated privileges to access another windows handle, but you do. It's mainly a Windows perk in the newer versions.
07/18/2012 16:24 KraHen#5
If it`s not for official CO check out the Alchemy source, it might work just fine, and you could easily incorporate bot functions in it.