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 


[C++]PostMessageA trampoline problems

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

Joined: 20 Mar 2006
Posts: 86

PostPosted: Sun Dec 28, 2008 6:01 am    Post subject: [C++]PostMessageA trampoline problems Reply with quote

Here's my code for an autoshooter prog
http://utilitybase.com/paste/10525

My problem now is, when i press F1 to start it, it doesnt double click nor click, instead this happens



when i deactivate it, it becomes normal again


Any idea what im doing wrong?

and dont mind the wrong things in the code, too lazy to change it
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Dec 28, 2008 9:44 am    Post subject: Reply with quote

Code:

_PM(MSHWND, WM_LBUTTONDBLCLK, MK_LBUTTON, lparam);

Try

Code:

_PM(MSHWND, WM_LBUTTONDBLCLK, NULL, NULL);

or
Code:

_PM(MSHWND, WM_KEYDOWN, MK_LBUTTON, lparam);


If neither of those work I suggest you use SendInput();
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Sun Dec 28, 2008 9:57 am    Post subject: Reply with quote

_void_, seen as how he has to hook-hop PostMessage, the game can be assumed to be using Game Protection, and probably hooking SendInput.

As for the code..

You're trying to click..?

Try this:
Code:

POINT CursorCoords;

GetCursorPos(&CursorCoords);
_PostMessageA(hwnd,WM_LBUTTONDBLCLK,MK_LBUTTON,MAKELPARAM(CursorCoords.x, CursorCoords.y));
_PostMessageA(hwnd,WM_LBUTTONUP,MK_LBUTTON,MAKELPARAM(CursorCoords.x, CursorCoords.y));
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Dec 28, 2008 10:00 am    Post subject: Reply with quote

smartz993 wrote:
_void_, seen as how he has to hook-hop PostMessage, the game can be assumed to be using Game Protection, and probably hooking SendInput.

As for the code..

You're trying to click..?

Try this:
Code:

POINT CursorCoords;

GetCursorPos(&CursorCoords);
_PostMessageA(hwnd,WM_LBUTTONDBLCLK,MK_LBUTTON,MAKELPARAM(CursorCoords.x, CursorCoords.y));
_PostMessageA(hwnd,WM_LBUTTONUP,MK_LBUTTON,MAKELPARAM(CursorCoords.x, CursorCoords.y));

Just because it has protection doesn't mean it's GameGuard.
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Sun Dec 28, 2008 10:04 am    Post subject: Reply with quote

_void_ wrote:
smartz993 wrote:
_void_, seen as how he has to hook-hop PostMessage, the game can be assumed to be using Game Protection, and probably hooking SendInput.

As for the code..

You're trying to click..?

Try this:
Code:

POINT CursorCoords;

GetCursorPos(&CursorCoords);
_PostMessageA(hwnd,WM_LBUTTONDBLCLK,MK_LBUTTON,MAKELPARAM(CursorCoords.x, CursorCoords.y));
_PostMessageA(hwnd,WM_LBUTTONUP,MK_LBUTTON,MAKELPARAM(CursorCoords.x, CursorCoords.y));

Just because it has protection doesn't mean it's GameGuard.


Who said GG is the only game protection that does hooks in the kernel?
Back to top
View user's profile Send private message
Xoujiro
Advanced Cheater
Reputation: 0

Joined: 20 Mar 2006
Posts: 86

PostPosted: Sun Dec 28, 2008 10:06 am    Post subject: Reply with quote

_void_ wrote:
Code:

_PM(MSHWND, WM_LBUTTONDBLCLK, MK_LBUTTON, lparam);

Try

Code:

_PM(MSHWND, WM_LBUTTONDBLCLK, NULL, NULL);

or
Code:

_PM(MSHWND, WM_KEYDOWN, MK_LBUTTON, lparam);


If neither of those work I suggest you use SendInput();

The first one has the same problem and the second one, the yellow box comes out normally for 0.3 sec then disappears, but not at the top right, the game uses GameGuard btw

@smartz993
doesnt click, do i need to hook GetCursorPos or something?


Last edited by Xoujiro on Sun Dec 28, 2008 10:14 am; edited 1 time in total
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Dec 28, 2008 10:09 am    Post subject: Reply with quote

Xoujiro wrote:
_void_ wrote:
Code:

_PM(MSHWND, WM_LBUTTONDBLCLK, MK_LBUTTON, lparam);

Try

Code:

_PM(MSHWND, WM_LBUTTONDBLCLK, NULL, NULL);

or
Code:

_PM(MSHWND, WM_KEYDOWN, MK_LBUTTON, lparam);


If neither of those work I suggest you use SendInput();

The first one has the same problem and the second one, the yellow box comes out normally for 0.3 sec then disappears, but not at the top right, the game uses GameGuard btw

Oh, last time I played it was XTrap :S
Back to top
View user's profile Send private message
Xoujiro
Advanced Cheater
Reputation: 0

Joined: 20 Mar 2006
Posts: 86

PostPosted: Sun Dec 28, 2008 10:19 am    Post subject: Reply with quote

_void_ wrote:
Xoujiro wrote:
_void_ wrote:
Code:

_PM(MSHWND, WM_LBUTTONDBLCLK, MK_LBUTTON, lparam);

Try

Code:

_PM(MSHWND, WM_LBUTTONDBLCLK, NULL, NULL);

or
Code:

_PM(MSHWND, WM_KEYDOWN, MK_LBUTTON, lparam);


If neither of those work I suggest you use SendInput();

The first one has the same problem and the second one, the yellow box comes out normally for 0.3 sec then disappears, but not at the top right, the game uses GameGuard btw

Oh, last time I played it was XTrap :S


yeah, they changed it, now gg makes the game laggier..
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