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 


[HELP] Is it possible to export into a .txt?

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

Joined: 27 Oct 2015
Posts: 59

PostPosted: Sat Jun 06, 2020 7:18 pm    Post subject: [HELP] Is it possible to export into a .txt? Reply with quote

For the safety of my current update code / hacks I'm going to block off the name of the hacks incase the owner of the private server searches for my name on google and lands here. I have a question I've been wondering for a while. Is it possible to export the Description and value of the cheat table threw lua?

for example when i auto update the bytes I want to export it to a text.



I woud like to export the Description, Address, Value
is this something possible?

so this way i can create a button on my form to export to a .txt
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4300

PostPosted: Sat Jun 06, 2020 7:35 pm    Post subject: Reply with quote

Code:
local header = AddressList.getMemoryRecordByDescription('AUTO-UPDATE-BYTES')
local strings = createStringList()
strings.beginUpdate()

for i = 0, header.Count - 1 do
  local mr = header.Child[i]
  strings.add(('%s, %08X, %s'):format(mr.Description, mr.CurrentAddress, mr.Value))
end

strings.endUpdate()
strings.saveToFile('foo.txt')
strings.destroy()

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
ZxPwds
Advanced Cheater
Reputation: 0

Joined: 27 Oct 2015
Posts: 59

PostPosted: Sat Jun 06, 2020 9:22 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Code:
local header = AddressList.getMemoryRecordByDescription('AUTO-UPDATE-BYTES')
local strings = createStringList()
strings.beginUpdate()

for i = 0, header.Count - 1 do
  local mr = header.Child[i]
  strings.add(('%s, %08X, %s'):format(mr.Description, mr.CurrentAddress, mr.Value))
end

strings.endUpdate()
strings.saveToFile('foo.txt')
strings.destroy()



Wow thanks amazing I really appreciate it, as for the address is there a way to make it show the Base.exe+Address?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4300

PostPosted: Sat Jun 06, 2020 9:37 pm    Post subject: Reply with quote

Code:
-- Replace:
  strings.add(('%s, %08X, %s'):format(mr.Description, mr.CurrentAddress, mr.Value))
-- with:
  strings.add(('%s, %s, %s'):format(mr.Description, getNameFromAddress(mr.CurrentAddress), mr.Value))

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
ZxPwds
Advanced Cheater
Reputation: 0

Joined: 27 Oct 2015
Posts: 59

PostPosted: Tue Jun 09, 2020 11:58 am    Post subject: Reply with quote

As always ParkourPenguin you are amazing. Thank you so much.
this worked perfectly. So I managed to make it a little better by showing the RVA address by doing this!

Code:
local header = AddressList.getMemoryRecordByDescription('AUTO-UPDATE-BYTES')
local strings = createStringList()
strings.beginUpdate()

for i = 0, header.Count - 1 do
  local mr = header.Child[i]
 --strings.add(('%s, %s, %s'):format(mr.Description, getNameFromAddress(mr.CurrentAddress), mr.Value))
 strings.add(('%s, %08X, %08X, %08X, %s'):format(mr.Description, mr.CurrentAddress, getAddress("gunz.exe"), mr.CurrentAddress - getAddress("game.exe"), mr.Value))
end

strings.endUpdate()
strings.saveToFile('foo.txt')





If you have some time please review the third post on this thread. I'm a little confused on this. I'm sure I did everything right, I didn't fool around with any property controls for this type of situation to be happening.

https://forum.cheatengine.org/viewtopic.php?t=614485
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