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 


How to check which forms are..

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Thu May 30, 2013 12:15 pm    Post subject: How to check which forms are.. Reply with quote

Hey,
How can I check which forms are calling the closeCE() function?
I want to restrict closeCE() for X forms (for some tool).
I've done this

Code:
oldcloseCE = closeCE
closeCE = nil
function closeCE(sender)
showMessage("Are you sure?")
--print(type(sender)) --> returns userdata
oldcloseCE()
end
closeCE()

I have 2 forms (UDF1, UDF2)
and some scripts which will are using createForm function.

How can I allow only UDF1, and UDF2 to allow closeCE() while createForm() forms won't do anything.

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu May 30, 2013 12:24 pm    Post subject: Reply with quote

createForm() forms do not call closeCE() Only if you give them an onClose event manually and inside that onClose event have the code closeCE()

I recommend something similar to what you do but just make the original closeCE() useless and throughout your code only use oldcloseCE()

So UDF1 and UDF2 use oldcloseCE() in their code, and any other form calls closeCE() which is actually just an empty function

_________________
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
View user's profile Send private message MSN Messenger
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Thu May 30, 2013 12:38 pm    Post subject: Reply with quote

oh I see!
Thanks,
Pretty simple!

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
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 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