Jump to content

Recommended Posts

Posted (edited)

Using this code, it always returns as a 0 when pressing the button. The memory value is correct, but it's a string. Does "char" need to be incorporated as $sv_type? Anything I'm blatantly missing?

#include <GUIConstants.au3>
#include <NomadMemory.au3>
GUICreate("My GUI Button")
$Button_1 = GUICtrlCreateButton ("Check Memory Address",  10, 30, 150)
$Label_1 = GUICtrlCreateLabel("(blah)",20, 60)
GUISetState ()

;$Mem_Address = 0x19790F64 ;
$Process1 = WinGetProcess("[xxx]")

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_1
   $Mem_Open = _MemoryOpen($Process1)
   $Mem_Read = _MemoryRead(0x19790F64, $Mem_Open, "char[4]")
   GUICtrlSetData($Label_1,$Mem_Read) ; sets label to value of read memory
   _MemoryClose($Mem_Open) ;close it afterwards
    EndSelect
Wend

Thanks!

Edited by Skizzy
Posted

Nevermind, this simple code got me what I want and it was much simpler.

#include <NomadMemory.au3>
   #include <GUIConstants.au3>
   #include <Misc.au3>
   #include <Array.au3>

   $ID=_MemoryOpen(ProcessExists("blah.exe"))
   $Address=0x19790F64
   $value=_MemoryRead($Address,$ID ,"char[6]")


     sleep(100)
   MsgBox(0,"Value", $value)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...