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 Programatically Addresses From Txt File

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

Joined: 20 Dec 2014
Posts: 103

PostPosted: Tue Jun 30, 2015 10:07 am    Post subject: Load Programatically Addresses From Txt File Reply with quote

I would like to read addresses from a txt file and load them into the address lists in Cheat Engine.

Let's say I have a text file such as:

api.dll+0x00004200
api.dll+0x000042A0
api.dll+0x000042B0
api2.dll+0x000052BC

....(Continue)

How can I do that ?

Thanks
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Tue Jun 30, 2015 10:44 am    Post subject: Reply with quote

You can use Lua's file IO to open and read the file. Check out the Lua manual here for more information on how to manage files:
http://www.lua.org/pil/21.2.html
http://www.lua.org/pil/21.2.1.html

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
fred26
Expert Cheater
Reputation: 0

Joined: 20 Dec 2014
Posts: 103

PostPosted: Tue Jun 30, 2015 11:46 am    Post subject: Reply with quote

Thanks, I have a further question for this purpose. How can I get a module's address from it's name in Lua?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Tue Jun 30, 2015 2:28 pm    Post subject: Reply with quote

You can use the 'getAddress' function in Lua to do that.

Code:

getAddress(string, local OPTIONAL): returns the address of a symbol. Can be a modulename or an export. set Local to true if you wish to querry the symboltable of the ce process

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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