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 


Newest Lua syntax in CE?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Wed Feb 22, 2017 7:11 pm    Post subject: Newest Lua syntax in CE? Reply with quote

Where can I find the newest Lua syntax for CE? I couldn't find everything in main.lua. For example, I use the following to change the text of a label:
Code:

control_setCaption(CETrainer.CELabel1, "This is a test.")

Is this the newest syntax of CE? Also, how about this:
Code:

getAddressList().getMemoryRecordByDescription('BugCheck-1').Active=true


I have a feeling that I am not coding every efficiently. I learnt some new syntax here and there from the posts on this forum. I would like to know if there is a place where I can find more information about the new Lua syntax.


Thanks a lot.[/code]

_________________
**************

A simple example is better then ten links. Very Happy
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Wed Feb 22, 2017 7:33 pm    Post subject: Re: Newest Lua syntax in CE? Reply with quote

If I understood what you meant, then take a look at it here.
And with the CE open go to "Help" -> "Cheat Engine Help" -> "Memory Viewer" -> "Script Engine".

_________________
...
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Wed Feb 22, 2017 8:08 pm    Post subject: Reply with quote

the newest/recommended way to set the caption is using
Code:

CETrainer.CELabel1.Caption="This is a test."

_________________
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
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Wed Feb 22, 2017 8:38 pm    Post subject: Reply with quote

main.lua:
Quote:
Label Class: (Inheritance: GraphicControl->Control->Component->Object)
-- nothing of note here
...
GraphicControl Class: (Inheritance: Control->Component->Object)
-- nothing of note here either
...
Control Class: (Inheritance: Component->Object)
properties:
Caption: string - The text of a control
-- ^ Oh look, the thing

Your second example involving getAddressList is fine.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Wed Feb 22, 2017 10:58 pm    Post subject: Reply with quote

ParkourPenguin wrote:
main.lua:
Quote:
Label Class: (Inheritance: GraphicControl->Control->Component->Object)
-- nothing of note here
...
GraphicControl Class: (Inheritance: Control->Component->Object)
-- nothing of note here either
...
Control Class: (Inheritance: Component->Object)
properties:
Caption: string - The text of a control
-- ^ Oh look, the thing

Your second example involving getAddressList is fine.


@ParkourPenguin
@Dark Byte
@Filipe_Br

Thank you all for the replies. Special thanks to Penguin who showed me how to look for stuff in main.lua. Very Happy

_________________
**************

A simple example is better then ten links. Very Happy
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 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