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 


Call API, game no response

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
eigocc
Newbie cheater
Reputation: 0

Joined: 22 Dec 2018
Posts: 15

PostPosted: Tue Jan 08, 2019 12:40 am    Post subject: Call API, game no response Reply with quote

After calling API sendMessageW, the game lost its response and subsequent instructions were not executed!Can anyone help me with this problem?I don't know what this is about.[/img]


2.png
 Description:
 Filesize:  44.02 KB
 Viewed:  584 Time(s)

2.png



1.png
 Description:
 Filesize:  36.89 KB
 Viewed:  584 Time(s)

1.png



3.png
 Description:
 Filesize:  8.15 KB
 Viewed:  584 Time(s)

3.png


Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 366

Joined: 09 May 2003
Posts: 21602
Location: The netherlands

PostPosted: Tue Jan 08, 2019 1:31 am    Post subject: Reply with quote

Is the place you hook the main GUI thread? if so, sendmessage waits till the message has been handled, and the main GUI thread is the one that does the handling. Use postmessage instead
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
eigocc
Newbie cheater
Reputation: 0

Joined: 22 Dec 2018
Posts: 15

PostPosted: Tue Jan 08, 2019 1:56 am    Post subject: Reply with quote

Great, you solved my problem perfectly!
Back to top
View user's profile Send private message Send e-mail
eigocc
Newbie cheater
Reputation: 0

Joined: 22 Dec 2018
Posts: 15

PostPosted: Tue Jan 08, 2019 10:00 am    Post subject: Reply with quote

Now we have a new problem,I need to hit the space bar when the ball crosses the red line,But because it's so fast and postMessage has latencySo I can't hit the space bar on time,This problem can be solved by sendMessage.Is there any method to solve the problem of unresponsive program?


1.png
 Description:
 Filesize:  15.24 KB
 Viewed:  551 Time(s)

1.png


Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 366

Joined: 09 May 2003
Posts: 21602
Location: The netherlands

PostPosted: Tue Jan 08, 2019 11:45 am    Post subject: Reply with quote

send the space one frame before it's time, the next frame it will check the keyboard buffer again and then check the ball position
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
eigocc
Newbie cheater
Reputation: 0

Joined: 22 Dec 2018
Posts: 15

PostPosted: Tue Jan 08, 2019 12:35 pm    Post subject: Reply with quote

This is a game, the speed is not the same, so it is not compatible with all the speed!I tried using hookWndProc to intercept the button and return a message, but this still didn't work!In this way, all the buttons are invalid. What's more, the game is still unresponsive!I hope you can help me solve this problem!
Back to top
View user's profile Send private message Send e-mail
eigocc
Newbie cheater
Reputation: 0

Joined: 22 Dec 2018
Posts: 15

PostPosted: Tue Jan 08, 2019 10:50 pm    Post subject: Reply with quote

cmp eax,36f
jne originalcode
push eax
push 0
push 20
push 102
push [point+4]
call sendMessageA
pop eax
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
After sendMessage is called, is there any way to make the program wait?I want sendMessage to finish executing before running the rest of the code!
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 366

Joined: 09 May 2003
Posts: 21602
Location: The netherlands

PostPosted: Wed Jan 09, 2019 1:23 am    Post subject: Reply with quote

you need to use postmessage or use a different non-message method.

You're sending the message too late.

but try SendNotifyMessageA

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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