 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Mon Nov 27, 2006 7:48 am Post subject: Api with a game? Need lots of help here... |
|
|
Ok, here's the situation. There is a game called MapleStory and I am
trying to make a sort of a macro for it. The things it needs to be able
to do are:
- Move the mouse to coords x and y (I was able to do this)
- Click at the specified coords (for some reason this wouldn't work...)
- Press arrow keys, enter key, and escape key (need lots of help here,
keybd_event isn't working out too well)
- (all this being done without me doing anything)
Here's a sample of what I have for the cursor position and clicking.
SetCursorPos(691,589);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(100);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
I got it to MOVE, but it never clicks...
And here's what I have tried to get it to automatically press a key.
keybd_event(VK_RIGHT,0,0 , 0);
keybd_event(VK_RIGHT,0,0 , 0);
And these don't work at all..
Any help/advice you could give me would be appreciated. By the way, I'm
14, and I'm a newbie so, if possible, explain things as much as you
can.
Also, when I press the button to activate it, I have to click on the
game... Is there something I have to do with SetForegroundWindow?
I don't even know how to use that though...
And there IS a 5 second delay so it does give me time to get back in
game...
Any help would be appreciated, and thanks for reading! |
|
| Back to top |
|
 |
ThievingSIx Guest
|
Posted: Tue Dec 26, 2006 9:12 am Post subject: Re: Api with a game? Need lots of help here... |
|
|
jeffrey92 (AT) gmail (DOT) com wrote:
| Quote: | Ok, here's the situation. There is a game called MapleStory and I am
trying to make a sort of a macro for it. The things it needs to be able
to do are:
- Move the mouse to coords x and y (I was able to do this)
- Click at the specified coords (for some reason this wouldn't work...)
- Press arrow keys, enter key, and escape key (need lots of help here,
keybd_event isn't working out too well)
- (all this being done without me doing anything)
Here's a sample of what I have for the cursor position and clicking.
SetCursorPos(691,589);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(100);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
I got it to MOVE, but it never clicks...
And here's what I have tried to get it to automatically press a key.
keybd_event(VK_RIGHT,0,0 , 0);
keybd_event(VK_RIGHT,0,0 , 0);
And these don't work at all..
Any help/advice you could give me would be appreciated. By the way, I'm
14, and I'm a newbie so, if possible, explain things as much as you
can.
Also, when I press the button to activate it, I have to click on the
game... Is there something I have to do with SetForegroundWindow?
I don't even know how to use that though...
And there IS a 5 second delay so it does give me time to get back in
game...
Any help would be appreciated, and thanks for reading!
|
Your first step is so disable nProtect/Gameguard. They were made to
prevent this sort of thing. |
|
| Back to top |
|
 |
|
|
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
|
|