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 


Scan for new processes every 3 seconds?

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

Joined: 19 Jul 2016
Posts: 2

PostPosted: Tue Jul 19, 2016 4:54 am    Post subject: Scan for new processes every 3 seconds? Reply with quote

Hello everyone, I made a trainer using cheat engine and it works, the thing is that it doesnt work unless I open the game first.
Could you guys tell me what script should I use to make the trainer look for new processes every three seconds? I couldnt find anything about this which is strange because I think most of the trainers got this function.
Thanks.
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Tue Jul 19, 2016 5:12 am    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?t=529853&sid=2e3817b3d8c461b1d0e678a28f30c4ac

the timer method a few posts in
Back to top
View user's profile Send private message
johnstewart
How do I cheat?
Reputation: 0

Joined: 19 Jul 2016
Posts: 2

PostPosted: Tue Jul 19, 2016 7:25 am    Post subject: Reply with quote

Thanks, it works.
One last question, once I close and reopen the game, the trainer wont autoattach to the new process. Is there any script to fix that?
Thanks
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Jul 19, 2016 5:25 pm    Post subject: Reply with quote

Code:
reattach = createTimer(nil, false)
reattach.Interval = 5000
reattach.OnTimer = function(timer)
  if readInteger("kernel32.dll") == nil then
    if openProcess("game.exe") then
      return
    end
    reattach.Interval = 500
  end
end
function onOpenProcess(processId)
  reattach.Interval = 5000
  reattach.Enabled = true
end
Back to top
View user's profile Send private message
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