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 


[FASM] PostMessage and Mouse click

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Mindw0rk
Newbie cheater
Reputation: 0

Joined: 07 Oct 2007
Posts: 16

PostPosted: Sat Nov 29, 2008 5:02 pm    Post subject: [FASM] PostMessage and Mouse click Reply with quote

Hello everyone,

Im trying to make a macro via PostMessage. For a start i want to make a simple mouseclick ingame. First I found what kind of messages I need to do that these are:

WM_LBUTTONDOWN
WM_NCHITTEST
WM_SETCURSOR
WM_LBUTTONUP

So I get handle of game window via FindWindow and call PostMessage

invoke PostMessage,[Handle],WM_LBUTTONDOWN,MK_LBUTTON,[xy]
invoke PostMessage,[Handle],WM_NCHITTEST,0,[xy]
invoke PostMessage,[Handle],WM_MBUTTONUP,MK_LBUTTON,[xy]

and the problem is

nHittest = LOWORD(lParam); // hit-test code
wMouseMsg = HIWORD(lParam); // mouse-message identifier

hit test code is a string, such as HTCLIENT and mouse message ID is 512 but it seems to change even when the same message sequence is sent.

My question is how to combine string and number into one DWORD to send WM_SETCURSOR, also im not sure if this will work, so please help if you know more about simulating mouse clicks in asm, thanks.

_________________
Your paradise is my hell.
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
Page 1 of 1

 
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