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 


need a Working Append, Scroll on memo

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
nebusk
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 07 Jun 2019
Posts: 10

PostPosted: Wed Mar 11, 2020 5:27 am    Post subject: need a Working Append, Scroll on memo Reply with quote

Hi im new and i really need someone to make this script work for me.
Basically when the script gets executed, the result will be shown in memo instead of Lua engine. i also need a vertical scroll bar on the right side of the memo. once again i need a fully working ct file of it and not just a script.

this is the script :

script1 = [[
This is sample using cheat engine.
About how to get text from text boxes
]]

input = UDF1.CEEdit1.Text

script2 = string.format("Make sure this "..input.." placed under a function on your cheat table")

function GetScript()
local form = createForm( true );
control_setCaption(form, [[Output Script]])
form.width = 800;
form.height = 800;
local memo = createMemo(form)
control_setPosition(memo, 0,0)
memo.width = 800
memo.height = 800
memo.Lines.Text = script1
memo.append = script2 ------ need correction
end

function resetMemo()
--- if memo created then destroy or delete memo class
end
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Wed Mar 11, 2020 6:50 am    Post subject: Reply with quote

Not sure if this you wanted:

Code:
script1 = [[
This is sample using cheat engine.
About how to get text from text boxes
]]

input = UDF1.CEEdit1.Text

script2 = string.format("Make sure this "..input.." placed under a function on your cheat table")

function GetScript()

 if form then form.destroy() end

 local form = createForm( true )
 control_setCaption(form, [[Output Script]])  --- What is this ?
 form.width = 800;
 form.height = 800;

 local memo = createMemo(form)
 control_setPosition(memo, 0,0)
 memo.width = 800
 memo.height = 800
 memo.ScrollBars = 'ssVertical'
 memo.Lines.Text = script1
 memo.Lines.Text=memo.Lines.Text..[[
]]..script2 ------ need correction
end

-- no need this because the memo automatic destroy when the form destroy
function resetMemo()
 if form then memo.destroy() end   -- or memo.clear()
end

UDF1.Show()
UDF1.CEButton1.OnClick = GetScript


Quote:
once again i need a fully working ct file of it and not just a script.


Do you mean someone makes a CT file for you?. I hope someone really understands what exactly you want and this post should be on Cheat Engine Lua Scripting subforum.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
nebusk
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 07 Jun 2019
Posts: 10

PostPosted: Wed Mar 11, 2020 4:35 pm    Post subject: s Reply with quote

can u make a working .ct of it and send i really need.
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Wed Mar 11, 2020 6:48 pm    Post subject: Reply with quote

1. Open Cheat Engine
2. On menu: Click Table > Show Cheat Lua Table (or press CTRL ALT L)
3. Copy and paste to there this script below

Code:
-- Create 1st FORM and objects
mainform = createForm()
mainform.setSize(200,100)
mainform.Position = 'poScreenCenter'
mainform.Caption = 'FU*K Form'

editbox = createEdit(mainform)
editbox.setPosition(5,15)
editbox.Width = 190

button1 = createButton(mainform)
button1.Width = 100
button1.setPosition(50,50)
button1.Caption = 'Get Script'

-- Variables
script1 = [[
This is sample using cheat engine.
About how to get text from text boxes
]]

-- Functions
function GetScript()
 if secondform then secondform.destroy() end
 local secondform = createForm(true)
 secondform.setSize(600,700)
 secondform.Caption = 'Output Script'
 local memo = createMemo(secondform)
 memo.setPosition(0,0)
 memo.width = 600
 memo.height = 700
 memo.ScrollBars = 'ssVertical'
 memo.Lines.Text = script1
 input = editbox.Text
 script2 = string.format("Make sure this "..input.." placed under a function on your cheat table")
 memo.Lines.Text=memo.Lines.Text..[[
]]..script2
 secondform.OnClose = function()
 secondform.destroy()
 end
end

mainform.OnClose=function()
 closeCE()
 return caFree
end

button1.OnClick = GetScript


4. On CE Lua Script Table, click File > Save
5. Give the name for your CT file (example: dumb.CT)
6. Click Save

You got your CT file

PS: You can try at home without any questions.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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