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 


PostMessage problem

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
GuM
Expert Cheater
Reputation: 0

Joined: 17 Jan 2007
Posts: 185
Location: The Netherlands

PostPosted: Mon Jan 14, 2008 12:50 pm    Post subject: PostMessage problem Reply with quote

Well, I want to simulate a mouseclick with PostMessage in MapleStory, but it only moves Maples cursor. It doesn't click.
This is the code I use:
Code:
PostMessageA(HandleWnd, WM_LBUTTONDOWN, 0, makelparam(x,y));
PostMessageA(HandleWnd, WM_LBUTTONUP, 1, makelparam(x,y));

I have also tried WM_LBUTTONDBLCLK, and it doesn't work either.

I use Delphi btw.
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Jan 14, 2008 2:10 pm    Post subject: Reply with quote

Symbol wrote:
Can't help about looting, not playing MapleStory anymore, I don't even have maple on my computer...
About auto clicking, I discovered it doesn't work even when using GGLess, but one time, when the button that I used to send messages by clicking on it was exacly where another button of MapleStory was, thats how I discovered it works if you move your mouse over the button, it does click, so use SetCursorPos(X,Y) to set the position and then use postmessage. (I guess sendkeys and other keyboard/mouse events are blocked, so clicking - postmessage, mouse position - setcursorpos or just move the mouse manualy...)

Quote from another post... too lazy to write it all over again. Confused
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Mon Jan 14, 2008 2:46 pm    Post subject: Reply with quote

I'm also doing that atm, but with SendMessage.

But if
Code:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);


Works, so SendMessage should work as well, isn't it?
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Jan 14, 2008 3:44 pm    Post subject: Reply with quote

It works because your mouse is over the button. if you move the mouse with postmessage, which will actually make you have 2 mouses, 1 the real and the second just a poor animation, the button_click events and all these events are still the same, if the mouse clicks the button, do this and that, not "if the animation of maple's cursor is over the button and you clicked on a random pixel it will click the button".
You need your actual mouse over the button in order to click it, not some white pixels. Rolling Eyes
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Mon Jan 14, 2008 4:41 pm    Post subject: Reply with quote

Ohh okay. That sucks.
As far as I know are there is a way to simulate a button-click.
I'll search for it

Edit:
Well, there's a program called WinSpy (I think there's only a german version)
You can go with your mouse over a button and get the name of it.
Here's a screenshot:
http://www.delphipraxis.net/download.php?id=29627

But it doesn't work for MS... Rolling Eyes
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Tue Jan 15, 2008 7:02 am    Post subject: Reply with quote

that's why C is the king.... Smile
Back to top
View user's profile Send private message
GuM
Expert Cheater
Reputation: 0

Joined: 17 Jan 2007
Posts: 185
Location: The Netherlands

PostPosted: Tue Jan 15, 2008 8:41 am    Post subject: Reply with quote

Rot1 wrote:
that's why C is the king.... Smile

I don't think it's any different in C? Confused
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Tue Jan 15, 2008 8:44 am    Post subject: Reply with quote

ChewingGum wrote:
Rot1 wrote:
that's why C is the king.... Smile

I don't think it's any different in C? Confused


Ye, I'm quite sure there isn't.

Btw: Rot = Red in german ..lol
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Tue Jan 15, 2008 9:53 am    Post subject: Reply with quote

rEakW0n wrote:
ChewingGum wrote:
Rot1 wrote:
that's why C is the king.... Smile

I don't think it's any different in C? Confused


Ye, I'm quite sure there isn't.

Btw: Rot = Red in german ..lol


because when it comes to hacking tools, you mitght wanna make them in C, it's stable than Delphi.

aha, cool :D
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