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 


Load text from a file in a server

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

Joined: 06 Aug 2013
Posts: 13

PostPosted: Sun Aug 11, 2013 7:12 pm    Post subject: Load text from a file in a server Reply with quote

Hello ppl, i'm learning lua yet and i rly trying to do this by my self but some times i just got lost in the forum.
My problem is:
In my form (udf9) i have a CEMemo1 w/o any text. My question is, what i need to write in the lua table to load a text from my site to this CEMemo when execute the form?
i have all the socket.http stuff there

http = require("socket.http")
file = http.request("URL/file")
loadstring(file)() <- lost here Confused
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Mon Aug 12, 2013 3:05 am    Post subject: Reply with quote

Code:
http = require("socket.http")
text = http.request("URL/file")
UDF9.CEMemo1.Lines[0] = text

_________________
Back to top
View user's profile Send private message MSN Messenger
MadSnake
Newbie cheater
Reputation: 0

Joined: 06 Aug 2013
Posts: 13

PostPosted: Mon Aug 12, 2013 6:48 pm    Post subject: Reply with quote

mgr.inz.Player wrote:
Code:
http = require("socket.http")
text = http.request("URL/file")
UDF9.CEMemo1.Lines[0] = text


Thank you very much dude, works fine Smile
Back to top
View user's profile Send private message
MadSnake
Newbie cheater
Reputation: 0

Joined: 06 Aug 2013
Posts: 13

PostPosted: Wed Aug 14, 2013 12:20 am    Post subject: Reply with quote

For some reason the old texts still in the memobox. I changes the text in my server but the old ones still in there.... Any clue?
Or some line to clear all the memobox before laod the text from my server?
Thanks ^^
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Wed Aug 14, 2013 3:31 am    Post subject: Reply with quote

You have to use "clear" method:

Code:
http = require("socket.http")
text = http.request("URL/file")
UDF9.CEMemo1.clear()
UDF9.CEMemo1.Lines[0] = text

_________________
Back to top
View user's profile Send private message MSN Messenger
MadSnake
Newbie cheater
Reputation: 0

Joined: 06 Aug 2013
Posts: 13

PostPosted: Thu Aug 15, 2013 12:41 pm    Post subject: Reply with quote

oh thanks a lot ^^ now i just need to know how to "lock" the memobox to do not be editable i not found the function in form editor
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Aug 15, 2013 1:04 pm    Post subject: Reply with quote

Tip: It starts with "ReadOnl"
_________________
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
MadSnake
Newbie cheater
Reputation: 0

Joined: 06 Aug 2013
Posts: 13

PostPosted: Thu Aug 15, 2013 1:39 pm    Post subject: Reply with quote

ooh gotcha ^^

and my last question before i get ban from here to be so annoying lol

i created a form windows with a font (broadway.ttf) and my friend dont have this font, when i generated the exe file i put this font with the lua/mime/socket files together but he cant see the font, the text become with another font.
Any way to put the font in the exe file to my friend can see w/o send the ttf file?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Fri Aug 16, 2013 4:21 am    Post subject: Reply with quote

well, you could put the ttf inside the ct file, and then ran extract it to the folder where windows stores it's fonts. (C:\Windows\Fonts)
No idea if you also need to modify the registry

Also, some people might not like it when you start writing files to the windows dir

_________________
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
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