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 


Access objects

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
MErtHRMKsE
Newbie cheater
Reputation: 0

Joined: 02 Jul 2012
Posts: 21

PostPosted: Mon Jul 07, 2014 10:30 pm    Post subject: Access objects Reply with quote

I'm creating a Trainer through the "Generate generic trainer..." option and I'm using Lua to run what I want to do. The only problem is, I don't know how to access the objects I've put in my main window such as labels and buttons. How would I, example, whenever I press a button, it changes the label's caption to "hi"?
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Tue Jul 08, 2014 12:29 am    Post subject: Reply with quote

Code:
FormName.ObjectName.Caption = 'hi';


For example you have form named UDF1.
You add a button on it named CEButton1, so to change it's name you'll need to

Code:
UDF1.CEButton1.Caption = "Hi";

_________________
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