| View previous topic :: View next topic |
| Author |
Message |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Mon Sep 03, 2007 11:48 am Post subject: [Maple] Another wierd thing happened.. |
|
|
Well, the way I used before worked just fine. I mean, when I used the virtual key 'Z' it worked. But, when I replaced it in VK_LEFT it didn't move the player =\
I mean, why would it work for 1 key but not for the other?!
My code:
| Code: |
void SendVK(UINT vkKey)
{
MSG Msg;
Msg.hwnd = hWnd;
Msg.lParam = (MapVirtualKey(vkKey,MAPVK_VK_TO_VSC) << 16) & 0x00FF0000;
Msg.wParam = vkKey;
Msg.message = WM_KEYDOWN;
Msg.time = 0;
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
|
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Mon Sep 03, 2007 12:02 pm Post subject: |
|
|
| I didn't really look at the code, but I assume you are using the same function that you use for hiting 'Z' so I am going to take a wild guess here and say you are telling the computer to just 'tap' the left button and not hold it down.
|
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Mon Sep 03, 2007 12:10 pm Post subject: |
|
|
| I don't think it matters, it doesn't move left at all =\
|
|
| Back to top |
|
 |
ZenX Grandmaster Cheater Supreme
Reputation: 1
Joined: 26 May 2007 Posts: 1021 Location: ">>Pointer<<" : Address 00400560 Offset :1FE
|
Posted: Mon Sep 03, 2007 12:50 pm Post subject: |
|
|
Well, you need to make it simulate.
Tapping the the button once wont really show much of a difference
Visual wise.At least not in maple.
ry to simulate the key, and see what happenes then.
_________________
CEF Moderator since 2007 ^_^
ZenX-Engine |
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Tue Sep 04, 2007 4:59 am Post subject: |
|
|
| ZenXChaos wrote: | Well, you need to make it simulate.
Tapping the the button once wont really show much of a difference
Visual wise.At least not in maple.
ry to simulate the key, and see what happenes then. |
Not true. I stand with my character looking right, I clicked the hotkey and it still looked right.
| x0r wrote: | Weird,I thought I already replied to this post....
Anyway, the Translate/DispatchMessage method doesn't work for movement & clicks so unfortunately you won't get anywhere trying that, I do have another method to do both though and I may post a snippet later. |
Why the hell won't it work?!
And by the way, jumping is possible with this..
Um... What's the other method?..
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Sep 08, 2007 12:06 am Post subject: |
|
|
Try this, idk if this will work or not though =P
| Code: |
MSG Msg;
Msg.hwnd = hWnd;
Msg.lParam = (MapVirtualKey(VK_LEFT,1) << 16) & 0x00FF0000;
Msg.wParam = 0;
Msg.message = WM_KEYDOWN;
Msg.time = 0;
TranslateMessage(&Msg);
DispatchMessage(&Msg);
Msg.message = WM_KEYUP;
TranslateMessage(&Msg);
DispatchMessage(&Msg);
|
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Sat Sep 08, 2007 12:20 pm Post subject: |
|
|
| I've tried it before, not working -_-
|
|
| Back to top |
|
 |
|