| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Game Hacking Dojo Master Cheater
 
  Reputation: 1 
 Joined: 17 Sep 2023
 Posts: 250
 
 
 | 
			
				|  Posted: Fri Aug 09, 2024 7:54 am    Post subject: Close Current CT |   |  
				| 
 |  
				| Is there a way to close the current cheat table without deleting the entries (since autosave will overwrite the original file)? The cheat table contains addresses/scripts, comments and code list entries.
 
 I think because this feature doesn't exist to my knowledge, someone is going to tell me to create an empty "cheattable.ct" in CE dir and call it when I want to close my cheat table using loadTable()
 
 Tell me if there is another way thank you
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dark Byte Site Admin
 
  Reputation: 470 
 Joined: 09 May 2003
 Posts: 25807
 Location: The netherlands
 
 | 
			
				|  Posted: Fri Aug 09, 2024 8:02 am    Post subject: |   |  
				| 
 |  
				| autosave doesn't overwrite the original file.  it saves it in "%localAppData%\Cheat Engine Autosave" 
 and yeah, just open an empty table
 _________________
 
 Do not ask me about online cheats. I don't know any and wont help finding them.
 Like my help? Join me on Patreon so i can keep helping
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Game Hacking Dojo Master Cheater
 
  Reputation: 1 
 Joined: 17 Sep 2023
 Posts: 250
 
 
 | 
			
				|  Posted: Fri Aug 09, 2024 9:00 am    Post subject: |   |  
				| 
 |  
				| Okay, this is how I did it: 
 
  	  | Code: |  	  | function closeCurrentCT() local filename = os.getenv("USERPROFILE").."\\Documents\\Empty.CT"
 local file = io.open(filename, "w")
 if file then
 file:close()
 --messageDialog("Success", "Empty cheat table has been created!", 2)
 loadTable(filename)
 os.remove(filename)
 --messageDialog("Success", "File has been remved!", 2)
 end
 end
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| panraven Grandmaster Cheater
 
 ![]() Reputation: 62 
 Joined: 01 Oct 2008
 Posts: 958
 
 
 | 
			
				|  Posted: Fri Aug 09, 2024 12:08 pm    Post subject: |   |  
				| 
 |  
				| This may be the minimum code to 'load' an empty table (without saving current table?) 
  	  | Code: |  	  | loadTable(createStringStream'<CheatTable></CheatTable>',false, true)
 
 | 
 
 This make an menu item in File Menu to use it , can be save in autorun :
 
  	  | Code: |  	  | local mf = MainForm
 local fileMi = mf.Menu.Items[0] -- files menu
 if not fileMi._mi_LoadEmptyCT_ and fileMi.Count > 2 then
 local mi = createMenuItem(fileMi)
 mi.Name = '_mi_LoadEmptyCT_'
 mi.Caption = 'load Empty CT'
 mi.OnClick = function()loadTable(createStringStream'<CheatTable></CheatTable>',false, true)end
 fileMi.insert(fileMi.Count-2,mi)
 end
 
 | 
 
 Only that the empty table seems don't clear the saved symbolist, <del>clear dissect data structures tho.</del>, dissect data and codelist.
 
 UPDATE: fixed.
 _________________
 
 - Retarded. 
 Last edited by panraven on Fri Aug 09, 2024 5:08 pm; edited 1 time in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Game Hacking Dojo Master Cheater
 
  Reputation: 1 
 Joined: 17 Sep 2023
 Posts: 250
 
 
 | 
			
				|  Posted: Fri Aug 09, 2024 1:16 pm    Post subject: |   |  
				| 
 |  
				| I was almost going to say that's perfect but upon testing, it doesn't clear the codelist. Thank you that was a good one really but since I want a perfect solution I'll stick to my approach 
 
 THANK YOU THAT ACTUALLY MADE ME FIND THIS WAY:
 
 
 
 This will clear everything
 
 
 And if you combine it with this:
 
 
  	  | Code: |  	  | MainForm.actOpen.OnExecute=function() if MainForm.OpenDialog1.execute() then
 loadTable(MainForm.OpenDialog1.FileName)
 end
 end
 | 
 You would never get the prompt of "Do want to merge CTs" again
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |