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 


Add Table Helpers to Tools Menu.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Tue Jan 09, 2018 8:31 pm    Post subject: Add Table Helpers to Tools Menu. This post has 1 review(s) Reply with quote

Just adds a "Tools" menu to the Cheat Engine main form with various helper functions.

Just add to the Cheat Engine autorun folder.

Code:

* Remove All Unnamed Structures  (prompts first)
* Remove All Structures  (prompts first)
* Disable All Memory Records  (prompts first)
* Disable No Run All Memory Records  (prompts first)
* Save All Table Files To Disk
* Remove All Table Files  (prompts first)
* Save All Cea Table Files To Disk
* Remove All Cea Table Files  (prompts first)
* Save All Lua Table Files To Disk
* Remove All Lua Table Files  (prompts first)
* Save All But Cea & Lua Table Files
* Remove All But Cea & Lua Table Files  (prompts first)
* Clean Table  (prompts first)
   See: CleanTableFunctionList
      'removeAllStructures'
      'removeAllButCeaLuaTableFiles'
      'removeAllCeaTableFiles'
      'removeAllLuaTableFiles'



pluginAddMenu_Tools_TableHelpers.lua
 Description:
I2 Table Help Functions v: 1.0.5

Download
 Filename:  pluginAddMenu_Tools_TableHelpers.lua
 Filesize:  13.91 KB
 Downloaded:  2892 Time(s)


_________________


Last edited by TheyCallMeTim13 on Tue Feb 01, 2022 10:48 pm; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
samy_grecu
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 30 Dec 2016
Posts: 12
Location: Italy

PostPosted: Fri Jan 12, 2018 5:20 am    Post subject: Reply with quote

Error:... Engine 6.7\autorun\pluginAddMenu_Tools_TableHelpers.lua:418: attempt to call a nil value (global 'addMenuItem')
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri Jan 12, 2018 7:32 am    Post subject: Reply with quote

@sam87

Sorry about that, stupid mistake on my part, didn't add the function but it was loaded by another extension I use. It's fixed now.

_________________
Back to top
View user's profile Send private message Visit poster's website
DeRol
Newbie cheater
Reputation: 0

Joined: 26 Aug 2009
Posts: 18

PostPosted: Tue Feb 01, 2022 9:53 pm    Post subject: Reply with quote

Thanks, I've found most of these functions useful.

I have a question about the Remove Structure parts.
Any clue on error handling these errors?

Code:
Error:List index (<some number>) out of bounds


I'm still learning a little bit of lua (using your posts as a guide, good stuff) and I was testing things by generating some empty structures:

Code:
-- create 20 blank structures
for i = 0, 19 do
    createStructure(blah).addToGlobalStructureList()
end
local structures = getStructureCount()
print(structures)


Then opening another tab and running code to reproduce the error:

Code:
print(getStructureCount())

for i = 0, getStructureCount() - 1 do
       print("before: ")
       print(getStructure(i))

       getStructure(i).removeFromGlobalStructureList()

       print("after: ")
       print(getStructure(i))
       end

print(getStructureCount())


I have to run the code multiple times until all the structures are gone due to the error.

I also tried error handling, but I don't think Cheat Engine supports it:

Code:
function removeStructs ()
  for i = 0, getStructureCount() - 1 do
         print("before: ")
         print(getStructure(i))

         getStructure(i).removeFromGlobalStructureList()

         print("after: ")
         print(getStructure(i))
         end
end

function errorhandler(err)
   print("AHHHH:",err )
end

status = xpcall(removeStructs,errorhandler)
print(status)



I know the Structure Dissect window has File > Delete All Structures , but I couldn't find anything in the wiki to call it.
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Tue Feb 01, 2022 10:51 pm    Post subject: Reply with quote

DeRol wrote:
...

A CE update makes it stop working the way it did. Basically it has to go through the structures backwards now. It's fixed and now updated to 1.0.5 on the top post.

_________________
Back to top
View user's profile Send private message Visit poster's website
DeRol
Newbie cheater
Reputation: 0

Joined: 26 Aug 2009
Posts: 18

PostPosted: Tue Feb 01, 2022 11:41 pm    Post subject: Reply with quote

TheyCallMeTim13 wrote:
DeRol wrote:
...

A CE update makes it stop working the way it did. Basically it has to go through the structures backwards now. It's fixed and now updated to 1.0.5 on the top post.


Oh, interesting.
Thanks for the reply.

edit--
Since you're updating things a bit, it looks like your Dev Tools menu on Fearless may need the same adjustment.

edit2--
never mind, looks like I didn't notice the update over there
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 Extensions 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