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 


A Few LUA Questions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue May 31, 2016 12:59 pm    Post subject: A Few LUA Questions Reply with quote

I am ultra stupid when it comes to LUA. Is there a way to execute an LUA script that will launch the specified target, auto-attach CE to process, auto-inject script and maybe even auto-break at startup to ensure that the script gets executed in time?

As a test, I wanted to modify a dll with a memory patch, but the patch needs to occur at startup. A traditional patch will not work in this case.

Thanks.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4291

PostPosted: Tue May 31, 2016 1:55 pm    Post subject: This post has 1 review(s) Reply with quote

I'm not sure if there's a better way, but here's something:
Code:
function onOpenProcess(pid)
  print("opened pid " .. pid)
end

shellExecute("C:\\Windows\\System32\\calc.exe")
openProcess("calc.exe")
pause()

autoAssemble([[
// something
]])
-- if you want to turn on a script:
getAddressList().getMemoryRecordByDescription("my script").Active = true

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue May 31, 2016 2:23 pm    Post subject: Reply with quote

That's perfect. Thanks a lot! Very Happy
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