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 


Cheat Engine LUA Automation

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

Joined: 10 Dec 2023
Posts: 2

PostPosted: Sun Dec 10, 2023 12:30 pm    Post subject: Cheat Engine LUA Automation Reply with quote

Hey! wondering if anyone could help me out with a quick question. I want to interface directory with the Cheat Engine LUA engine without actually opening up cheat engine. I know you can autorun scripts in the "Auto Run" folder, and that works fine and well but the cheat engine GUI opens up everytime, which i dont want. What I want is to do is this:

run python script that does some things -> uses cheatengine lua engine to AOB scan for bytes, writes addresses found/error to file -> python reads file.

I've already got the AOB script, the python script, the file writing, all of that. Problem is currently what I do is I run cheat engine, then close it. Any way to directly run against the LUA engine without running the executable? or forcing the executable into the background? CE GUI seems to have hard coded bring window to front in it. So creating a win shortcut and making it force hide doesnt work, neither does starting with cmd prompt /MIN option.

Any ideas?
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1531

PostPosted: Sun Dec 10, 2023 7:27 pm    Post subject: Reply with quote

The code below will provide the invisibility you want.
However, it will run delayed with a one-second blinking effect at startup.
You can change it to visible or invisible with the F8 key.

Or you can take what you need from the code and use it.

To test, package the code into a lua file, drop it into the CE>>Autorun folder and open a CE window.


Code:
function HideMF()
sleep(200)
  if MainForm.Visible==false then
    MainForm.Visible = true
    MainForm.ShowInTaskBar = "stAlways"
  else
    MainForm.Visible = false
    MainForm.ShowInTaskBar = "stNever"
  end
end

if vsbKey1 then vsbKey1.Destroy() vsbKey1=nil end

vsbKey1 = createHotkey(HideMF, VK_F8)

if vsbTmr1 then vsbTmr1.Destroy() vsbTmr1=nil end

vsbTmr1 = createTimer(MainForm)
vsbTmr1.Interval = 10

vsbTmr1.OnTimer=function()
MainForm.Visible = false
MainForm.ShowInTaskBar = "stNever"
vsbTmr1.Enabled = false
end

vsbTmr1.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
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