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 


Accessing files associated with a CT file

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

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Sat Dec 20, 2014 1:17 pm    Post subject: Accessing files associated with a CT file Reply with quote

Hi,I want to get the files that are associated with a ct file from Lua (see in picture).
In a form,I have a button that is an image,and when clicked,I want to change its texture (button.Picture) to the confirm_clicked.png image.
Any lua function to do it?couldn't find it.
-Thanks



img.png
 Description:
 Filesize:  9.82 KB
 Viewed:  5227 Time(s)

img.png


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: Sat Dec 20, 2014 2:49 pm    Post subject: Reply with quote

Code:

UDF1.button.Picture.loadFromStream(findTableFile('confirm_clicked.png').Stream)

_________________
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
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Sat Dec 20, 2014 4:14 pm    Post subject: Reply with quote

Dark Byte wrote:
Code:

UDF1.button.Picture.loadFromStream(findTableFile('confirm_clicked.png').Stream)


Thanks,didn't knew about streams...what is a stream?like a handle or something?
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: Sat Dec 20, 2014 4:23 pm    Post subject: Reply with quote

A stream is an abstract interface that is used to read/write raw data, like an image file in this case.
There a different implementations of streams like filestreams and memorystreams.

The tablefile contains a memorystream which is used in this case.
Note: sometimes you may have to set the position manually

_________________
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