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 


get the text from CEmemo1 [HELP]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
exohaxor
Expert Cheater
Reputation: 1

Joined: 02 Sep 2018
Posts: 101

PostPosted: Sat Sep 29, 2018 3:49 am    Post subject: get the text from CEmemo1 [HELP] Reply with quote

how i can get the text in CEmemo and use it on this
function xd()
"the text in CEmemo"
end
print(encodeFunction(xd))
end

so it has to encode the text in CEmemo1 and it will print encoded text
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sat Sep 29, 2018 4:16 am    Post subject: Reply with quote

Example : Form made using lua script

Code:
local form = createForm( true );
--control_setCaption(form, [[Output Script]])
form.width = 500;
form.height = 350;
form_centerScreen(form)
local memo = createMemo(form)
setProperty(memo, "alignment", "taRightJustify")
setProperty(memo, "alignment", "taLeftJustify")
control_setPosition(memo, 0,0)
memo.width = 500
memo.height = 300
memo.ScrollBars= 'ssBoth'  -- 'ssVertical' --or 2
--memo.Lines.Text = 'This is cheat engine'
--memo.Lines.Text=memo.Lines.Text..[[]]..aScript


function xd()
 memo.Lines.Text = 'This is cheat engine'
end

form.hide()
xd()
print(encodeFunction(xd))



Then if memo made use CE Form Designer :


Code:
function xd()
 UDF1.CEMemo1.Lines.Text = 'This is cheat engine'
end

xd()
print(encodeFunction(xd))

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sat Sep 29, 2018 4:47 am    Post subject: Reply with quote

encodeFunction(loadstring(UDF1.CEMemo1.Lines.Text))
_________________
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
noobes
Advanced Cheater
Reputation: 0

Joined: 17 Dec 2018
Posts: 89

PostPosted: Fri Dec 28, 2018 5:11 am    Post subject: Reply with quote

Dark Byte if i use : print(encodeFunction(UDF1.CEMemo1.Lines.Text))
i get a error in print "c-jL100001" what it means?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Dec 28, 2018 5:15 am    Post subject: Reply with quote

because you're forgetting loadstring
_________________
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
noobes
Advanced Cheater
Reputation: 0

Joined: 17 Dec 2018
Posts: 89

PostPosted: Fri Dec 28, 2018 5:34 am    Post subject: Reply with quote

i still get the same error by puttin it
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Dec 28, 2018 6:10 am    Post subject: Reply with quote

then likely the lua code in the memo isn't valid

Code:

local f,err=loadstring(UDF1.CEMemo1.Lines.Text)

if f==nil then
  print(err)
else
  print(encodeFunction(f))
end


_________________
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
noobes
Advanced Cheater
Reputation: 0

Joined: 17 Dec 2018
Posts: 89

PostPosted: Fri Dec 28, 2018 6:34 am    Post subject: Reply with quote

still not working
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Dec 28, 2018 6:38 am    Post subject: Reply with quote

what does the code I gave print out ?
_________________
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
noobes
Advanced Cheater
Reputation: 0

Joined: 17 Dec 2018
Posts: 89

PostPosted: Fri Dec 28, 2018 6:40 am    Post subject: Reply with quote

When the cememo is nill i get this : c-oWpDNPJ!ketlRCB=/U!NS2(5ypT38s!d+2p%I7h?-}P0O3I}DgXd8odog
And when in cememo is something written for me is 'sadad' it says : [string "sadad"]:1: syntax error near <eof>
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Dec 28, 2018 6:45 am    Post subject: Reply with quote

encodeFunction only takes functions
loadstring only loads lua code and converts that to a function

e.g:
Code:

something=12
bla='something else';
bla=bla..something
return bla


it does not take random text

_________________
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
noobes
Advanced Cheater
Reputation: 0

Joined: 17 Dec 2018
Posts: 89

PostPosted: Fri Dec 28, 2018 6:49 am    Post subject: Reply with quote

yes ur right ! thanks aswell
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