I would like to know how to call ReadProcessMemory through Dll, or use Classmemory, to repeat the same search that is in Cheat Engine, namely "Unknown initial value"?
Does anyone have any options on how this can be done based on the notepad.exe program?
I'm trying to partially port CheatEngine to an AHK environment by trying to replicate the methods.
So I'm interested in searching for values in the following scan types: "Binary, Byte, 2 byte, 4 byte, 8 byte, float, double and string
I also do not understand why this method does not find the required value in 4 byte:
Code: Select all
#SingleInstance force
#Include classMemory.ahk
if (_ClassMemory.__Class != "_ClassMemory")
msgbox Classmemory error
;=============================================================
processname := "ahk_exe win32calc.exe"
winget, pid, pid, %processname%
App := new _ClassMemory("ahk_pid " pid, "", hProcessCopy)
if !isObject(App)
{
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.
}
AOB := stringToAOBPattern("85695867", "UTF-8")
stringAdress := App.processPatternScan (0,0x7FFFFFFF, AOB*)
msgbox % stringAddress