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 


create object and add the handler [help]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Lynxz Gaming
Expert Cheater
Reputation: 1

Joined: 01 Jul 2017
Posts: 103

PostPosted: Fri Apr 13, 2018 2:36 am    Post subject: create object and add the handler [help] Reply with quote

Can Lua create an object and add the handler?

Thanks!

_________________
Hello Hitler !
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater
Reputation: 33

Joined: 09 Aug 2013
Posts: 862

PostPosted: Fri Apr 13, 2018 5:22 am    Post subject: Reply with quote

what object, what handler? If you mean create a form or form component and add an event handler like .OnClick then yes, you can find examples on the forum easily enough by searching google with something like https://www.google.com/search?q=site%3Acheatengine.org+"create"+"OnClick"

eg. http://www.cheatengine.org/forum/viewtopic.php?p=5730073&sid=9db31000360d40125c50144053cf4b2d#5730073

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
MateeJr Gaming
Advanced Cheater
Reputation: 0

Joined: 24 Dec 2017
Posts: 52

PostPosted: Fri Apr 13, 2018 5:22 am    Post subject: Reply with quote

Heh bro a , gimana buat confuser? Gw nanya nanya At0ms and FreeER And Corroder , yang master pun ga tau
_________________
Hi Lynxz Gaming
Back to top
View user's profile Send private message
Lynxz Gaming
Expert Cheater
Reputation: 1

Joined: 01 Jul 2017
Posts: 103

PostPosted: Fri Apr 13, 2018 7:03 am    Post subject: Reply with quote

FreeER wrote:
what object, what handler? If you mean create a form or form component and add an event handler like .OnClick then yes, you can find examples on the forum easily enough by searching google with something like https://www.google.com/search?q=site%3Acheatengine.org+"create"+"OnClick"

eg. http://www.cheatengine.org/forum/viewtopic.php?p=5730073&sid=9db31000360d40125c50144053cf4b2d#5730073

FreeEr what if the object is Checkbox and how to make the OnChanged event handler?

_________________
Hello Hitler !
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 19

Joined: 24 Feb 2017
Posts: 529
Location: 'Merica

PostPosted: Fri Apr 13, 2018 7:11 am    Post subject: Re: create object and add the handler [help] Reply with quote

Lynxz Gaming wrote:
Can Lua create an object...

Yes

Lynxz Gaming wrote:
...and add the handler?...

bumble bee tuna

Lynxz Gaming wrote:
FreeER wrote:
what object, what handler? If you mean create a form or form component and add an event handler like .OnClick then yes, you can find examples on the forum easily enough by searching google with something like https://www.google.com/search?q=site%3Acheatengine.org+"create"+"OnClick"

eg. http://www.cheatengine.org/forum/viewtopic.php?p=5730073&sid=9db31000360d40125c50144053cf4b2d#5730073

FreeEr what if the object is Checkbox and how to make the OnChanged event handler?


Why not just ask "How do I add an OnChanged event to a Checkbox in Lua"?

Or if you can access google:
https://www.google.com/search?q=cheat+engie+OnChanged+Checkbox

_________________
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater
Reputation: 33

Joined: 09 Aug 2013
Posts: 862

PostPosted: Fri Apr 13, 2018 7:16 am    Post subject: Reply with quote

same way

local whatever = createWhatever()
whatever.OnEventName = function(sender) ... end

As for finding all the event names (and which are supported) I don't have a good source for that other than looking in the form editor inside CE or possibly this portion of the CE source https://github.com/cheat-engine/cheat-engine/blob/10a7e6ba6d8cd4f2f4b3f1d6f77bf8d9b850045f/Cheat%20Engine/ceguicomponents.pas

Some events also pass additional arguments (like OnKeyPress), again I don't know any good way to figure those out other than just letting the form editor create one for you to see (or googling that specific event or test with var args and print them out with tostring to see what you get).

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Lynxz Gaming
Expert Cheater
Reputation: 1

Joined: 01 Jul 2017
Posts: 103

PostPosted: Fri Apr 13, 2018 7:33 am    Post subject: Reply with quote

FreeER wrote:
same way

local whatever = createWhatever()
whatever.OnEventName = function(sender) ... end

As for finding all the event names (and which are supported) I don't have a good source for that other than looking in the form editor inside CE or possibly this portion of the CE source https://github.com/cheat-engine/cheat-engine/blob/10a7e6ba6d8cd4f2f4b3f1d6f77bf8d9b850045f/Cheat%20Engine/ceguicomponents.pas

Some events also pass additional arguments (like OnKeyPress), again I don't know any good way to figure those out other than just letting the form editor create one for you to see (or googling that specific event or test with var args and print them out with tostring to see what you get).

Thx worked!

_________________
Hello Hitler !
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