Alright i have a silly question/problem and I hope 1 of you AHK guru's can help me out.
Im trying to read memory from a game but I came across 1 problem.
This is my code
Code:
;read the address from an ini so you dont have to change the code everytime
IniRead, char, C:/myfile.ini, Test, Address
;feed the Address to the var lpszTitle
lpszTitle = %Address%
;the var that will store the result
teststr =
;the loop to move from eash byte
Loop
{
ReadProcessMemory, char, %lpszTitle%, ahk_id, [Conquer 2.0]
; the first byte is stored on the variable char
; If the value of the byte read is zero we are at the end of the string.
; So quit the loop!
if char = 0
{
break
}
; Transform the obtained byte's value to a character and save it in char again
Transform, char, Chr, %char%
; Append the character to our teststr variable that will hold the whole title string
teststr = %teststr%%char%
; Increment address by one to obtain next byte
lpszTitle++
}
;display the value
Msgbox, %teststr%
Now I dont now if theres a problem within the code or anything, it just keeps running in a loop it doesnt quit or anything but no messagebox showed up.
this is what my ini file exists of:
Code:
[Test]
Address=&h4E1CEC
Now i know that is the correct memory address but i dont know if AHK can read it like that.
If someone can help me solve this Id be very thankfull
