I am using the following code but I keep getting the error "Handle Closed:" I am on ( Windows 8.1 x64 )!
Numpad1:: Hotkey, *~$Left, Toggle ReadMemory(MADDRESS=0,PROGRAM="") { Static OLDPROC, ProcessHandle VarSetCapacity(MVALUE,4,0) If PROGRAM != %OLDPROC% { WinGet, pid, pid, % OLDPROC := PROGRAM ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("CloseHandle" ,"UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess" ,"Int",16,"Int",0,"UInt",pid) : 0) } If (ProcessHandle) && DllCall("ReadProcessMemory","UInt" ,ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0) return *(&MVALUE+3)<<24 | *(&MVALUE+2)<<16 | *(&MVALUE+1)<<8 | *(&MVALUE) return !ProcessHandle ? "Handle Closed: " closed : "Fail" } Program := "csgo.exe" Address := 0xA6DA14 Offset := 0x23F8 *~$Left:: { Value := ReadMemory( Address+Offset , Program ) MsgBox %value% }