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 form for scripting

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

Joined: 22 Jun 2021
Posts: 510

PostPosted: Sun Feb 13, 2022 2:17 pm    Post subject: create form for scripting Reply with quote

Let's say i want to make form for scripting(not lua engine) to make users do what they want with custom functions,default one and cheat engines one(lua engine but with modifications)
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 51

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Feb 13, 2022 4:22 pm    Post subject: Reply with quote

Yeah, you'd want to use loadstring or load.

Code:

f = loadstring("local a = 10; return a + 20")
    print(f())          --> 30

https://www.lua.org/pil/8.html

_________________
Back to top
View user's profile Send private message Visit poster's website
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 510

PostPosted: Tue Feb 15, 2022 10:03 am    Post subject: Reply with quote

TheyCallMeTim13 wrote:
Yeah, you'd want to use loadstring or load.

Code:

f = loadstring("local a = 10; return a + 20")
    print(f())          --> 30

https://www.lua.org/pil/8.html


doesn't work with createSynEdit
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1520

PostPosted: Tue Feb 15, 2022 10:32 am    Post subject: Reply with quote

Just an example of approach;

(Example Memo)

Code:
aa=UDF1.CEMemo1.Lines.Text
--assert(loadstring(aa))()
loadstring(aa)()

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 510

PostPosted: Thu Feb 17, 2022 3:50 pm    Post subject: Reply with quote

i've mind further and solved it by myself,anyways thanks
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