View previous topic :: View next topic |
Author |
Message |
Gravy How do I cheat? Reputation: 0
Joined: 28 Sep 2012 Posts: 2
|
Posted: Fri Sep 28, 2012 3:30 am Post subject: Exporting Search Result Data |
|
|
So I've captured a whole lot of strings from a game and I need to export them. I've found no way of exporting the string value other than double clicking and copying for each of the 200+ results (this scan).
Is there something I'm missing? Any advice? Anything?
I'll be exporting more than 60,000 in the long run so clicking one at a time isn't really practical.
The form it comes out as doesn't really matter, if there's something else I can export that will carry that data in any way. Other than a full process memory dump which takes 2gb+.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Fri Sep 28, 2012 3:38 am Post subject: |
|
|
Just execute this script in lua and you will be able to paste it into notepad
Code: |
ms=getCurrentMemscan()
fl=memscan_getAttachedFoundlist(ms)
count=foundlist_getCount(fl)
result=""
for i=0,count-1 do
result=result..foundlist_getAddress(fl, i).." - "..foundlist_getValue(fl,i).."\n\r\n\r"
end
writeToClipboard(result)
|
(alternatively you could just write the result file directly to a file using the io. routines)
_________________
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 |
|
|
Gravy How do I cheat? Reputation: 0
Joined: 28 Sep 2012 Posts: 2
|
Posted: Fri Sep 28, 2012 5:47 am Post subject: |
|
|
Thanks that was almost what I wanted, though I worded my question slightly wrong. I actually wanted the results from the address list as I had to resize the string length to get the full length text. Only the beginning was non-variant.
Thanks for the push in the right direction, I finally know what LUA is now and have a rough idea how to play with it.
Here's my modification to that script for anyone who may need it.
Code: | addresslist=getAddressList()
count = addresslist_getCount(addresslist)
result=""
for i=0,count-1 do
record = addresslist_getMemoryRecord(addresslist, i)
result=result..memoryrecord_getValue(record).."\n\r\n\r"
end
writeToClipboard(result) |
P.S. You're work on Cheat Engine is really appreciated.
Added:
Unfortunately LUA seems to support a max string length of 255 characters. This is less than the length of the string that's showing in Cheat Engine.
Do you have any other solution to this?
"(alternatively you could just write the result file directly to a file using the io. routines)"
I'd also appreciate a hint on what/how one would do this.
Kindly appreciated.
Last edited by Gravy on Fri Sep 28, 2012 8:46 am; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Fri Sep 28, 2012 8:10 am Post subject: |
|
|
No, this is a limit of the addresslist
You could try using readString on the address of the cheatentry
_________________
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 |
|
|
Gravy How do I cheat? Reputation: 0
Joined: 28 Sep 2012 Posts: 2
|
Posted: Fri Sep 28, 2012 8:38 am Post subject: |
|
|
Dark Byte wrote: | No, this is a limit of the addresslist
You could try using readString on the address of the cheatentry |
In the address list I have the max length at 5000 character and it shows all the data, and I can view/copy it no problem.
It's only when getting the data via LUA is it ever truncated to 255 characters.
======
readString - It seems does not work with UTF-8 strings and terminates after the first letter.
Code: | addresslist=getAddressList()
count = addresslist_getCount(addresslist)
result=""
for i=0,count-1 do
record = addresslist_getMemoryRecord(addresslist, i)
result=result..readString(memoryrecord_getAddress(record),2000)
end
writeToClipboard(result) |
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Fri Sep 28, 2012 11:26 am Post subject: |
|
|
try
Code: |
result=result..readString(memoryrecord_getAddress(record),2000, true)
|
The last parameter defines if it's UTF8 or UTF16
_________________
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 |
|
|
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Tue Jul 16, 2019 7:45 pm Post subject: |
|
|
This LUA scrip does copy to clipboard but leave two spaces between each line. Is there any way to fix that?
ms=getCurrentMemscan()
fl=memscan_getAttachedFoundlist(ms)
count=foundlist_getCount(fl)
result=""
for i=0,count-1 do
result=result..foundlist_getAddress(fl, i).." - "..foundlist_getValue(fl,i).."\n\r\n\r"
end
writeToClipboard(result)
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Tue Jul 16, 2019 11:58 pm Post subject: |
|
|
replace \n\r\n\r with \n
_________________
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 |
|
|
|