The syntax would look something like this:
Code: Select all
pBase = gameBaseAddress + offset ; 0x009F0000 + 00991690
p1 = ReadMemory(pBase, "GameName.exe")
p2 = ReadMemory(p1 + 0x1A8, "GameName.exe")
p3 = ReadMemory(p2 + 0x84, "GameName.exe")
p4 = ReadMemory(p3 + 0x40C, "GameName.exe")
p5 = ReadMemory(p4 + 0x430, "GameName.exe")
finalValue_Result = ReadMemory(p5 + 0x2F4, "GameName.exe")
Alternatively, you can use this memory class to read and write values.
https://github.com/Kalamity/classMemory ... Memory.ahk
The syntax would look like this
Code: Select all
value := mem.read(mem.BaseAddress + 0x00991690, "UInt", 0x1A8, 0x84, 0x40C, 0x430, 0x2F4)
Complete example:
Code: Select all
; The contents of the classMemory.ahk file can be copied directly into your script. Alternately, you can copy the classMemory.ahk file into your library folder,
; in which case you will need to use the #include directive in your script i.e.
#Include <classMemory>
if (_ClassMemory.__Class != "_ClassMemory")
msgbox class memory not correctly installed. Or the (global class) variable "_ClassMemory" has been overwritten
; create an object to read memory from the target process
; mem := new _ClassMemory("ahk_exe calc.exe", "", hProcessCopy)
mem := new _ClassMemory("ahk_exe rqmain.exe", "", hProcessCopy)
; Check if the above method was successful i.e. found the process and opened it.
if !isObject(mem)
{
msgbox failed to open a handle
if (hProcessCopy = 0)
msgbox The program isn't running (not found) or you passed an incorrect program identifier parameter.
else if (hProcessCopy = "")
msgbox OpenProcess failed. If the target process has admin rights, then the script also needs to be ran as admin. Consult A_LastError for more information.
ExitApp
}
; - You only need to do the stuff above once (if the process closes/restarts, then you need to do it again).
; read the pointer
value := mem.read(mem.BaseAddress + 0x00991690, "UInt", 0x1A8, 0x84, 0x40C, 0x430, 0x2F4)
; alternatively, you can do:
;pointer := [mem.BaseAddress + 0x00991690, "UInt", 0x1A8, 0x84, 0x40C, 0x430, 0x2F4]
;value := mem.read(pointer*)
msgbox % value