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 


How do i find out the function the exits a game?

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

Joined: 10 Apr 2020
Posts: 172

PostPosted: Mon Sep 07, 2020 10:11 pm    Post subject: How do i find out the function the exits a game? Reply with quote

I have my game opened. I open the menu and there's Quite Game.
How do i find out the code just before the game exit?

This would be good so that i make an injection to close my ahk scripts.

Please help. Very Happy
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Sep 08, 2020 12:49 am    Post subject: This post has 1 review(s) Reply with quote

a way easier method is routinely read the memory of the process .exe
if it's unreadable, the process has closed

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 172

PostPosted: Tue Sep 08, 2020 6:05 pm    Post subject: Reply with quote

Thank you.

But that was precisely the method i was trying to avoid.

I dont know why but i have this aversion to loops. Razz Very Happy
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 941

PostPosted: Tue Sep 08, 2020 7:40 pm    Post subject: Reply with quote

Let AHK itself do the dirty job?
https://www.reddit.com/r/AutoHotkey/comments/84dhw6/help_auto_run_script_when_program_runs_auto/

_________________
- Retarded.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Sep 09, 2020 2:25 pm    Post subject: Reply with quote

Without a loop:
obtain a handle to the process, create a new thread, and in there do an infinite long wait with WaitForSingleObject on that handle.
When it returns the process has closed, so from that thread then trigger an event

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
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 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