Memory Reading...
Okay so the problem is that the GUI is exiting before it even reads the memory. First I got an error that the process wasn't open, I fixed that (I had the wrong .exe) After that fix, the Form will load just long enough to close which I don't understand I have my Infinite loop to keep it open, so it has to be something in the function for searching my health that is closing the whole program, which I believe it has to be below the Error for the PID since I already had that error pop up before and I fixed it....
Any help at all will be greatly appreciated!
Any help at all will be greatly appreciated!
Code:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <NomadMemory.au3>
#RequireAdmin
SetPrivilege("SetDebugPrivilege", 1)
Opt("GUIOnEventMode", 1)
Global $PID
Global $sModule = "MemoryMan.dll"
$Form1 = GUICreate("Form1", 125, 106, 192, 124)
$Label1 = GUICtrlCreateLabel("Label1", 8, 8, 36, 17)
$Label2 = GUICtrlCreateLabel("Label2", 8, 32, 36, 17)
$Label3 = GUICtrlCreateLabel("Label3", 8, 56, 36, 17)
$Label4 = GUICtrlCreateLabel("Label4", 8, 80, 36, 17)
GUISetState(@SW_SHOW)
$RunOnce = 1
While 1
Sleep(500)
While $RunOnce = 1
Call(_SearchHP())
$RunOnce = 0
WEnd
WEnd
Func _SearchHP()
$PID = _MemoryOpen(ProcessExists("client.exe")
If $PID = 0 Then
MsgBox(4096, "Error", "Talisman is not running!", 20)
Return
EndIf
HpAddy = "28644C98"
$MyHp = _MemoryRead($HpAddy, $PID, "int")
GUICtrlSetData($Label1, $MyHp)
EndFunc