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 


A small suggestion for Lua Script window 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: Tue Mar 07, 2017 12:23 pm    Post subject: A small suggestion for Lua Script window in CE. :) Reply with quote

I have been writing lua code in CE for several days, and I have a small, or maybe naive, suggestion: I think it would be nice for the Lua Script window to have a tab control, which does something like this:

In the first tab, we can declare every global variables, functions. The stuff in this tab compiles before the second tab.

Then in the second tab, we write our code.


As a result, we can write code more efficiently and have easier maintenance as well. Just like we can create a class in a separate tab in Visual Studio.

I don't know if it's doable and easy to implement. If not, please ignore this post. Very Happy

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

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

Joined: 14 Jun 2013
Posts: 93

PostPosted: Tue Mar 07, 2017 5:23 pm    Post subject: Reply with quote

Shit I'd just be happy with a kill button.
Back to top
View user's profile Send private message
usernotfound
Expert Cheater
Reputation: 0

Joined: 21 Feb 2016
Posts: 115

PostPosted: Tue Mar 07, 2017 8:06 pm    Post subject: Reply with quote

Maybe not quite what you are looking for, but what I like to do is create separate memory records, start each one off with a {$lua} and then that way I contain all my hacks/global vars/gui logic/etc. in their respective records (pressing 'OK' executes it like Lua table does). I use the main lua script table then to activate those records when the trainer is loaded

Code:
getMemoryRecordByDescription('Hacks').Active = true
getMemoryRecordByDescription('Addresses').Active = true
-- etc..


You can also just save your separate Lua scripts as .lua file and use require 'yourscriptname' to run that script outside of the CE table (like including libraries in VS)
Back to top
View user's profile Send private message
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Tue Mar 07, 2017 8:36 pm    Post subject: Re: A small suggestion for Lua Script window in CE. :) Reply with quote

fmanager wrote:
I have been writing lua code in CE for several days, and I have a small, or maybe naive, suggestion: I think it would be nice for the Lua Script window to have a tab control, which does something like this:

In the first tab, we can declare every global variables, functions. The stuff in this tab compiles before the second tab.

Then in the second tab, we write our code.


As a result, we can write code more efficiently and have easier maintenance as well. Just like we can create a class in a separate tab in Visual Studio.

I don't know if it's doable and easy to implement. If not, please ignore this post. Very Happy




I looked into this awhile back its possible with multiple memo classes.
the memo class is not the mscript class so you get syntax highlighting or such

_________________
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Tue Mar 07, 2017 9:29 pm    Post subject: Re: A small suggestion for Lua Script window in CE. :) Reply with quote

akumakuja28 wrote:
fmanager wrote:
I have been writing lua code in CE for several days, and I have a small, or maybe naive, suggestion: I think it would be nice for the Lua Script window to have a tab control, which does something like this:

In the first tab, we can declare every global variables, functions. The stuff in this tab compiles before the second tab.

Then in the second tab, we write our code.


As a result, we can write code more efficiently and have easier maintenance as well. Just like we can create a class in a separate tab in Visual Studio.

I don't know if it's doable and easy to implement. If not, please ignore this post. Very Happy




I looked into this awhile back its possible with multiple memo classes.
the memo class is not the mscript class so you get syntax highlighting or such


Can you illustrate more about memo class? I don't quite get the idea.

@usernotfound
Thanks for the reply. I have been using your first solution too, as for the second one, I'm not sure. Because I kinda do not want the user to modify the lua file, which may cause the trainer to crash.

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

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

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed Mar 08, 2017 4:22 am    Post subject: This post has 1 review(s) Reply with quote

check your mailbox
_________________
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Wed Mar 08, 2017 10:40 am    Post subject: Reply with quote

akumakuja28 wrote:
check your mailbox


Thank you, +rep.

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

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