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 


Auto Closing Cheat Engine- Want

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
BadCake
How do I cheat?
Reputation: 0

Joined: 08 May 2023
Posts: 9

PostPosted: Tue May 05, 2026 9:34 am    Post subject: Auto Closing Cheat Engine- Want Reply with quote

How can I make cheat engine close itself after a certain amount of time and/or if the game I used it on are closed? Wuthering waves, for example will close itself if i left cheat engine opened. I now usually use cheat engine only for speed hack for Stoneshard. An auto close "setting" would be great if I accidently left CE open when I wanted to play WuWa.

So, what should I do? if you told me to "create this and that", my next question is probably "how" so, exact instruction is greatly appreciated.
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3384

PostPosted: Tue May 05, 2026 11:26 am    Post subject: Reply with quote

I would start a timer (say, 3/s) to detect when the process is gone.
When the process is gone, I would start another timer (say, 2s).
When this second timer fires, I'd call terminate().
This was close CE in 2-5 secs after process termination.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 39

Joined: 16 Feb 2017
Posts: 1576

PostPosted: Tue May 05, 2026 2:17 pm    Post subject: Reply with quote

Replace "Notopad.exe" with your application's executable name in the code, save the code to a ".lua" file, and place it in the CE>autorun folder.

Then, open CE first, and then the application to test it.

Code:
if clsTmr then clsTmr.Destroy() clsTmr=nil end
clsTmr = createTimer()
clsTmr.Interval = 10
clsTmr.Enabled = false

clsApp = "notepad.exe"

clsTmr.OnTimer=function()
   if getProcessIDFromProcessName(clsApp) then
     --print("CE closed!")
     closeCE()
     return cafree
   end
end

clsTmr.Enabled = true

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
BadCake
How do I cheat?
Reputation: 0

Joined: 08 May 2023
Posts: 9

PostPosted: Tue May 05, 2026 5:42 pm    Post subject: Reply with quote

AylinCE wrote:
Replace "Notopad.exe" with your application's executable name in the code, save the code to a ".lua" file, and place it in the CE>autorun folder.

Then, open CE first, and then the application to test it.

Code:
if clsTmr then clsTmr.Destroy() clsTmr=nil end
clsTmr = createTimer()
clsTmr.Interval = 10
clsTmr.Enabled = false

clsApp = "notepad.exe"

clsTmr.OnTimer=function()
   if getProcessIDFromProcessName(clsApp) then
     --print("CE closed!")
     closeCE()
     return cafree
   end
end

clsTmr.Enabled = true


CE closed almost immediately
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

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

PostPosted: Wed May 06, 2026 4:14 am    Post subject: Reply with quote

if the 'process' variable is not nil or an empty string and readByte(process) returns nil, close CE

maybe you're able to convert this to lua code

_________________
Tools give you results. Knowledge gives you control.

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

Joined: 16 Feb 2017
Posts: 1576

PostPosted: Wed May 06, 2026 7:36 am    Post subject: Reply with quote

BadCake wrote:

CE closed almost immediately


If it closed 'immediately' when you opened the target game, that means the code is working as intended. However, if it closes without the game being open, we need to debug the logic.

NOTE:

Please do not send your answers as "vague and uncertain."

Please specify whether the code works, whether it performs the task you intended, and if there are any missing or incorrect details.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions 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