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 


How to display text from a txt file in a label Cheat engine

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

Joined: 24 Jun 2015
Posts: 34

PostPosted: Tue Sep 05, 2017 5:58 am    Post subject: How to display text from a txt file in a label Cheat engine Reply with quote

Hello, I would like to know how I can show the text of a .txt file that is in add file to show the text of the file in a label or ceedit. Thank you.

Edit=

Hello folks I will again. Following what has been done above can help me.
How do I load text from text file in combobox 1 item per line?
The way I'm doing it it loads all in a single line. Thanks again.



YYY.jpg
 Description:
 Filesize:  97.24 KB
 Viewed:  9721 Time(s)

YYY.jpg



text.jpg
 Description:
 Filesize:  155.01 KB
 Viewed:  9763 Time(s)

text.jpg




Last edited by hemersonkla1 on Tue Sep 05, 2017 10:57 am; edited 1 time in total
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Tue Sep 05, 2017 8:27 am    Post subject: Reply with quote

Not certain that this is the best way but it worked with a quick test
Code:
local data = findTableFile('CE.txt').getData()
UDF1.CELabel1.Caption = readStringLocal(data.Memory, data.Size)


here's a more complete example: https://github.com/FreeER/CE-Examples/blob/master/read%20from%20tablefile.ct
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Sep 05, 2017 9:49 am    Post subject: Reply with quote

Code:

ss=createStringStream()
ss.CopyFrom(findTableFile('bla.CT').Stream,0)
text=ss.DataString
ss.destroy()

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

Joined: 24 Jun 2015
Posts: 34

PostPosted: Tue Sep 05, 2017 9:59 am    Post subject: Reply with quote

FreeER wrote:
Not certain that this is the best way but it worked with a quick test
Code:
local data = findTableFile('CE.txt').getData()
UDF1.CELabel1.Caption = readStringLocal(data.Memory, data.Size)


here's a more complete example: https://github.com/FreeER/CE-Examples/blob/master/read%20from%20tablefile.ct


Thank you very much, that was it.
and Dark Byte Thanks also. But this one I could not use. I'm an apprentice with some things.
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