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 


Output to File...I'm stuck!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
zezikaaikwe
How do I cheat?
Reputation: 0

Joined: 31 Mar 2012
Posts: 4

PostPosted: Sat Mar 31, 2012 7:43 pm    Post subject: Output to File...I'm stuck! Reply with quote

I've been trying to figure this out for a long, long time on my own. Rather than spin around in circles forever, I thought I'd reach out to the experts. As a disclaimer, I'm a bit of a noob, so bear with me...

What I want to do is simply log text displayed in my program to a file every time it changes. That's all. I'm at the point where I've located the address where the text is written to, and I've found the address that writes to it:

[not allowed to use URLs, so I've attached the images]

Okay, so now I suppose that I need to get that value out to a file via a code injection as per the tutorial. I'm trying desperately to do this, but I'm just not sure how to:

- write the assembly to output the value of the address to a file, or
- call a Lua script / C++ dll to do it

Is there a simple way to do this? Every similar link I've come across has to do with a simple "logfile:write", but I just don't know how to even begin to call that or reference the values I've found. Similarly, I don't even really understand how to loop in Lua into the code.

Any help would be much appreciated; my mind is spent. Thanks all.



Screen @ 3-31-2012, 9.15.54 PM.png
 Description:
screenshot2
 Filesize:  21.83 KB
 Viewed:  3739 Time(s)

Screen @  3-31-2012, 9.15.54 PM.png



Screen @ 3-31-2012, 9.12.48 PM.png
 Description:
screenshot
 Filesize:  26.32 KB
 Viewed:  3739 Time(s)

Screen @  3-31-2012, 9.12.48 PM.png


Back to top
View user's profile Send private message
booingthetroll
Expert Cheater
Reputation: 0

Joined: 30 Aug 2011
Posts: 114
Location: ::1

PostPosted: Sun Apr 01, 2012 9:15 pm    Post subject: Reply with quote

If you're a beginner, then in my opinion, your best bet will be Lua.
Example code:
local file = io.open("C:\\Users\\Taco\\HelloWorldProgram.lua", "w")
file:write("print('Hello World')")
Also, look at readBytes.
I'm assuming something like this would work.
Address = "Put address here"
Previous = readBytes(Address, length of string -- if the length is always different, then put the maximum length it gets to.)
while true do
Current = readBytes(Address, length of string -- what I said earlier)
if Previous ~= Current then
local file = io.open("C:\\Users\\Taco\\Log.lua", "a")
file:write(Current)
end
Previous = Current
T = os.time()
repeat until T == os.time() - 1
end
I'm sorry if the code is buggy, inefficient or not working -- even if it doesn't work, it shows what I believe is the most easy way to do what you are trying to do.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sun Apr 01, 2012 9:16 pm    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?t=550108
_________________
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
booingthetroll
Expert Cheater
Reputation: 0

Joined: 30 Aug 2011
Posts: 114
Location: ::1

PostPosted: Mon Apr 02, 2012 6:32 am    Post subject: Reply with quote

Even though it's unneeded, I just noticed that I put what would delay the loop out of the correct scope, that being the loop although now it does not matter.
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 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