Jump to content
Sign in to follow this  
azert

Read Mem

Recommended Posts

azert

Hi all,

I find on forum and don't find a solution for my problem :s.

It is possible to read in memory if I know the address in hex? and write all valu in a GUI with a refresh every 1min?

It is possible? :s

sorry I am a new :s but if U want help me after I can help other :P

thx for help bb

Share this post


Link to post
Share on other sites
Lej

Here's a small example with a simple GUI showing how to read the time from Minesweeper using Memory.au3.

Dunno if the address is the same for you but maybe it'll help anyway.

#include <Memory.au3>
#include <GUIConstants.au3>

; Globals
Global $ProcessID = WinGetProcess("Minesweeper")
Global $MemoryAddress = 0x0100579C
Global $MemoryType = 'short'

; Create GUI
GUICreate("MemoryReadExample", 200, 100, 0, 0)

; Create Label
$Label1 = GUICtrlCreateLabel("NothingRead", 10, 10, 100, 20)

; GUI MESSAGE LOOP
GuiSetState()

; Loop GUI until closed
Do
    
    $msg = GUIGetMsg()
    
    ;open the process
    $ProcessInformation = _MemoryOpen($ProcessID)
    
    ;read the memory
    $ReadValue = _MemoryRead($MemoryAddress, $ProcessInformation, $MemoryType)
    
    ;close the process
    _MemoryClose($ProcessInformation)
    
    ;display the value
    GUICtrlSetData($Label1, "Time: " & $ReadValue)
    
    Sleep(100)

Until $msg = $GUI_EVENT_CLOSE

; Exit
Exit

Memory.au3

MemoryReadExampleSimpleGUI.au3

Edited by Lej

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.