Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Not sending keys to maplestory
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Fri Dec 19, 2008 3:57 pm    Post subject: Not sending keys to maplestory Reply with quote

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
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Fri Dec 19, 2008 5:05 pm    Post subject: Re: Not sending keys to maplestory Reply with quote

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
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Dec 19, 2008 6:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Fri Dec 19, 2008 6:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Dec 19, 2008 6:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Fri Dec 19, 2008 6:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Dec 19, 2008 6:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
TheEyeOfGod
Master Cheater
Reputation: 0

Joined: 30 Sep 2006
Posts: 270

PostPosted: Fri Dec 19, 2008 6:28 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Fri Dec 19, 2008 7:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Fri Dec 19, 2008 7:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Fri Dec 19, 2008 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Sun Dec 21, 2008 12:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
BirdsEye
Advanced Cheater
Reputation: 0

Joined: 05 Apr 2008
Posts: 94

PostPosted: Sun Dec 21, 2008 2:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sun Dec 21, 2008 2:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Sun Dec 21, 2008 5:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites