Sign in to follow this  
Followers 0
Coatrackofsatan

Help reading Text from a Memory Address

2 posts in this topic

#1 ·  Posted (edited)

You see, I havent written a full program, just a little script that reads the last line of chat on GTA:SA:MP

I'm going to use this for reading text on RP servers blah blah blah

But here is my problem

when i read the last line (which has the static memory address 0x028156EC) i dont get text (even though i use the text flag 'char[255]')

instead i just get a big fat 0 when i output it to a message box (just to see if it works)

any help?

here is my code

BTW: I'm not too experienced with autoit, i'm just trying to work with it for this game (i do have java and python experience, however)

#include <GUIConstants.au3>
#include <NomadMemory.au3>
#include <Misc.au3>
#include <Array.au3>
SetPrivilege("SeDebugPrivilege", 1)
$Address = 0x028156EC; Last line of chat
$ID = WinGetProcess("GTA:SA:MP"); GTA:SA:MP
$value=_MemoryRead($Address,$ID,"char[255]")
MsgBox(0,"Value", $value)
Edited by Coatrackofsatan

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Sorry for the double post

but i pasted the wrong code

that was my old code

this one actually waits till i open the game, then outputs the value of the last line of chat

i get just a blank msg box, which is pretty confusing (and doesnt allow me to know if my code is working :) )

#include <GUIConstants.au3>
#include <NomadMemory.au3>
#include <Misc.au3>
#include <Array.au3>
SetPrivilege("SetDebugPrivilege", 1)
$Address = 0x028156EC
$Process1 = WinGetProcess("GTA:SA:MP")
$Mem_Open = _MemoryOpen($Process1)
WinWaitActive("GTA:SA:MP")
Sleep(3000)
MsgBox(0,"Value",_MemoryRead($Address,$Mem_Open,"char[255]"))
Edited by Coatrackofsatan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0