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 Forum Index
PostGo back to topic
Redouane
Master Cheater
Reputation: 3
Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Sat May 21, 2016 4:57 am    Post subject: Re: Enumerating list of Lua objects created?

To loop through all the user-created forms, you could write something like this:
Code:
for i,v in pairs(_G) do -- use _G or _ENV
     if type(v) == 'userdata' and v['getClassName'] and v.getClassName() == 'TCEForm' then print(i);
     end
end

Also, you could create the form only once in your script, and show it when the script runs (Check if the form exists, if it does, show it, otherwise, create the form and save it in a global variable, then show it).
No idea about the doNotSaveInTable flag (never found it necessary to use it)
Back to top
View user's profile Send private message
Post reviews:   Approve 1
Author Review
predprey
Review: Approve
Post reference:
ReviewPosted: Thu May 26, 2016 12:22 am


Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites