i'm trying to use Kalamity classMemory, The address value from CE is ok (value = 904173984), but not with AHK classMemory (value = 0). can someone help me?
here's my code
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#Include <ClassMemory>
; === ADDRESS ===
Client = ahk_exe Octopath_Traveler-Win64-Shipping.exe
BaseAddr := 0x14289E9C8 ; Usually 8 digit but i get 9 digit from "Octopath_Traveler-Win64-Shipping.exe"+0289E9C8
Base_Offsets := [0x890, 0x0, 0x3E4] ; Pointer from the bottom up
; === SCRIPT ==
game := new _ClassMemory(Client, "", hProcessCopy)
if !isObject(game)
{
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
}
value := game.read(BaseAddr, "UInt", Base_Offsets*)
MsgBox, % value
Sorry for my bad english
thanks in advance