| View previous topic :: View next topic |
| Author |
Message |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Fri Dec 19, 2008 3:57 pm Post subject: Not sending keys to maplestory |
|
|
void AutoAttack(HWND hWnd)
{
LPARAM lparam = (MapVirtualKey(VK_CONTROL, 0) << 16) + 1; //Send to graphic screen
HWND msHandle = FindWindow ("MapleStoryClass",0); //Find class window
while (!AutoAtt)
{
myPostMessage(msHandle, WM_KEYDOWN, VK_CONTROL, lparam);
myPostMessage(msHandle, WM_KEYUP, VK_CONTROL, NULL);
}
}
When I go in game and press f1 (I have autoattack hotkeyed) it doesn't send it to maplestory. _________________
| qwerty147 wrote: |
| ghostonline wrote: |
what world are you in?
|
bera
but i live in NZ
|
|
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Fri Dec 19, 2008 5:05 pm Post subject: Re: Not sending keys to maplestory |
|
|
| ElectroFusion wrote: | void AutoAttack(HWND hWnd)
{
LPARAM lparam = (MapVirtualKey(VK_CONTROL, 0) << 16) + 1; //Send to graphic screen
HWND msHandle = FindWindow ("MapleStoryClass",0); //Find class window
while (!AutoAtt)
{
myPostMessage(msHandle, WM_KEYDOWN, VK_CONTROL, lparam);
myPostMessage(msHandle, WM_KEYUP, VK_CONTROL, NULL);
}
}
When I go in game and press f1 (I have autoattack hotkeyed) it doesn't send it to maplestory. |
You just need myPostMessage(msHandle, WM_KEYDOWN, VK_CONTROL, lparam); no need for the KEY_UP. I don't know why it doesn't push control for you.
Last edited by &Vage on Fri Dec 19, 2008 7:50 pm; edited 1 time in total |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Fri Dec 19, 2008 6:12 pm Post subject: |
|
|
Are you sure that your function is being executed?
You can make sure by putting some MessageBox/OutputDebugString API calls in the function and check to make sure those are being executed.
Is your boolean !AutoAtt false? Woudn't you want it to be true in this case? Anyways you could have it backwards.
If it isn't being called your error lies in the hands of your hotkey managing.
Are you properly trampolining to PostMessageA?
I've never used +1 for my lParam, and it's worked.
Usually you would need WM_KEYUP, but like _void_ said, you don't need it for MapleStory. The reason is it doesn't wait for the WM_KEYUP message, it just looks for WM_KEYDOWN.
These are all questions you should be asking yourself, and modifying to answer. _________________
|
|
| Back to top |
|
 |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Fri Dec 19, 2008 6:17 pm Post subject: |
|
|
Holy crap lurc, thats the first time you didn't scream at me and call me a noob and tell me to go learn to code.
I'll try those. _________________
| qwerty147 wrote: |
| ghostonline wrote: |
what world are you in?
|
bera
but i live in NZ
|
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Fri Dec 19, 2008 6:19 pm Post subject: |
|
|
I'm not in the flaming mood atm and you didn't say anything overly annoying this time.
And now that Wiw3K is here, I'm seeing worse. _________________
|
|
| Back to top |
|
 |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Fri Dec 19, 2008 6:23 pm Post subject: |
|
|
I'm trying to learn, I don't wanna ask questions, but I can't help it, I have to. _________________
| qwerty147 wrote: |
| ghostonline wrote: |
what world are you in?
|
bera
but i live in NZ
|
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Fri Dec 19, 2008 6:26 pm Post subject: |
|
|
I know. I was like that at some point too.
But there's a line between asking just wanting to know the answer, and asking to learn why something is happening and why something isn't happening.
Why I try giving links and hint's rather then just giving people code and answers to their problems. _________________
|
|
| Back to top |
|
 |
TheEyeOfGod Master Cheater
Reputation: 0
Joined: 30 Sep 2006 Posts: 270
|
Posted: Fri Dec 19, 2008 6:28 pm Post subject: |
|
|
try
| Code: | myPostMessage(msHandle, VK_CONTROL, NULL, lparam);
myPostMessage(msHandle, VK_CONTROL, NULL, lparam); |
the lparam on both? Cause this seems to work fine for me |
|
| Back to top |
|
 |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Fri Dec 19, 2008 7:10 pm Post subject: |
|
|
Still doesn't work. It probably is my hotkeys... Thanks anyway _________________
| qwerty147 wrote: |
| ghostonline wrote: |
what world are you in?
|
bera
but i live in NZ
|
|
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Fri Dec 19, 2008 7:49 pm Post subject: |
|
|
| TheEyeOfGod wrote: | try
| Code: | myPostMessage(msHandle, VK_CONTROL, NULL, lparam);
myPostMessage(msHandle, VK_CONTROL, NULL, lparam); |
the lparam on both? Cause this seems to work fine for me |
WTF? |
|
| Back to top |
|
 |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Fri Dec 19, 2008 7:53 pm Post subject: |
|
|
| Code: | while (!AutoAtt)
{
myPostMessage(msHandle, WM_KEYDOWN, VK_CONTROL, lparam);
myPostMessage(msHandle, WM_KEYUP, VK_CONTROL, NULL);
}
} |
Correct me if im wrong. But you set it so that it sends Ctrl while AutoAtt is disabled.
| Code: | myPostMessage( msHandle, WM_KEYDOWN, NULL, MapVirtualKey( 0x11, NULL ) << 16 ) )
|
try that. |
|
| Back to top |
|
 |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Sun Dec 21, 2008 12:52 pm Post subject: |
|
|
It seems to be my hotkeys, it was because IDC_HK1 and stuff wasn't defined. The question is, how the hell do I do that? Add a Hotkey to the GUI? _________________
| qwerty147 wrote: |
| ghostonline wrote: |
what world are you in?
|
bera
but i live in NZ
|
|
|
| Back to top |
|
 |
BirdsEye Advanced Cheater
Reputation: 0
Joined: 05 Apr 2008 Posts: 94
|
Posted: Sun Dec 21, 2008 2:22 pm Post subject: |
|
|
| ElectroFusion wrote: | | It seems to be my hotkeys, it was because IDC_HK1 and stuff wasn't defined. The question is, how the hell do I do that? Add a Hotkey to the GUI? |
I do believe I've explained this before. On initialization use RegisterHotKey and respond to WM_HOTKEY with the corresponding ID. |
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sun Dec 21, 2008 2:45 pm Post subject: |
|
|
| ElectroFusion wrote: | Holy crap lurc, thats the first time you didn't scream at me and call me a noob and tell me to go learn to code.
I'll try those. |
lol'd. |
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Sun Dec 21, 2008 5:57 pm Post subject: |
|
|
| ElectroFusion wrote: | | It seems to be my hotkeys, it was because IDC_HK1 and stuff wasn't defined. The question is, how the hell do I do that? Add a Hotkey to the GUI? |
| Code: |
#define IDC_HK1 3000
#define IDC_HK2 3001 |
|
|
| Back to top |
|
 |
|