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 


Opening a .CT file on CE Startup?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
M1CR0H4CK3R
Newbie cheater
Reputation: 0

Joined: 20 Jun 2014
Posts: 10
Location: Indianapolis, Indiana, USA

PostPosted: Sat Jun 17, 2017 11:48 am    Post subject: Opening a .CT file on CE Startup? Reply with quote

I want to make a .bat file that starts CE, attaches to a certain process, then opens a specific Cheat Table. I heard CE doesn't accept cmd arguments. Is there an Autorun lua script that does this? Any help is appreciated.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Jun 17, 2017 12:49 pm    Post subject: Reply with quote

an example. I've just made file inside CE directory. Here what's inside batch file:
Code:
"Cheat Engine.exe" "C:\Users\Damian\Documents\My Cheat Tables\Prey.CT"


And it works. CE launched with Prey.CT opened.


For auto-attaching, be sure you have checked "Always" for "Table: Lua Scripts" in CE general settings.

And use something like this in Lua script window:
Code:
getAutoAttachList().add("prey.exe")

_________________
Back to top
View user's profile Send private message MSN Messenger
M1CR0H4CK3R
Newbie cheater
Reputation: 0

Joined: 20 Jun 2014
Posts: 10
Location: Indianapolis, Indiana, USA

PostPosted: Sat Jun 17, 2017 1:56 pm    Post subject: Reply with quote

mgr.inz.Player wrote:
an example. I've just made file inside CE directory. Here what's inside batch file:
Code:
"Cheat Engine.exe" "C:\Users\Damian\Documents\My Cheat Tables\Prey.CT"


And it works. CE launched with Prey.CT opened.


For auto-attaching, be sure you have checked "Always" for "Table: Lua Scripts" in CE general settings.

And use something like this in Lua script window:
Code:
getAutoAttachList().add("prey.exe")


I added this to main.lua, and it works well:

Code:
function onOpenProcess(processid)
  if (processid == id) then
      loadTable("ct dir")
    else
      end
    end


I replace the 'id' in 'if (processid == id) then' with the pid of the process, and the 'ct dir' in 'loadTable("ct dir")' with path of the .CT file (I figured out the hard way that '\' characters need escaped while doing this. Neutral ).
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 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