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 to automatically select an application that's open?

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

Joined: 29 Jul 2014
Posts: 1

PostPosted: Tue Jul 29, 2014 4:04 pm    Post subject: How to automatically select an application that's open? Reply with quote

Such as from a table..

local apps = {"Unturned.exe"}
OR, it doesn't even have to be from a table

_________________
~Inspectial
Back to top
View user's profile Send private message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Tue Jul 29, 2014 4:14 pm    Post subject: Re: How to automatically select an application that's open? Reply with quote

Inspectial wrote:
Such as from a table..

local apps = {"Unturned.exe"}
OR, it doesn't even have to be from a table


You mean open the process?
Code:
openProcess(process_Name_OR_ID)

for example : openProcess'Unturned.exe'

Wait a second!you want to auto-attach to that process?here's the code:
Code:
do
local t = createTimer( );
-- Avoiding repetitive global access
local PID , _read , _open = getOpenedProcessID , readBytes , openProcess;
     t.Interval , t.onTimer = 1000 , function ( )
     return ( ( PID() == 0 ) or not _read( 0x400000 , 1 ) ) and _open'notepad.exe'
-- Same as return  ( ( PID() ~= 0 ) and _read( 0x400000 , 1 ) ) or _open'Unturned.exe'
--[[ Some other code you may need to execute every second example:recalculate editbox value or label caption etc.
Change 0x400000 to the base of the main module of your application
If cheat engine is attached to another process,then it won't open this one]]--
     end
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