Hi,
ich habe heute die NomadMemory Funktion entdeckt und wollte das Beispiel mal testen.
Leider bekomme ich immer nur den Wert "0" ausgegeben.
Mit "#RequireAdmin" habe ich es schon versucht.. geändert hat sich aber nichts.
Hier ist mal der Inhalt aus der _MemoryRead_Example.au3 :
Spoiler anzeigen
#include <NomadMemory.au3>
;This example creates a sample GUI and shows how to use _MemoryRead
;and _MemoryWrite to read and write to the GUI's memory data.
;create the sample GUI
GUICreate("Sample GUI", 170, 85)
GUICtrlCreateLabel('Press "Read" to read the data from memory, or "Write" to write the data to memory.', 5, 5, 160, 55)
$ReadMemory = GUICtrlCreateButton("Read", 5, 60, 50, 20)
$WriteMemory = GUICtrlCreateButton("Write", 60, 60, 50, 20)
$CloseGUI = GUICtrlCreateButton("Close", 115, 60, 50, 20)
GUISetState()
;data to read/write
$DecimalRead = 987654321
$DecimalWrite = 123456789
$ASCIIRead = 'Going Out'
$ASCIIWrite = 'Coming In'
$ProcessID = WinGetProcess("Sample GUI")
[/autoit] [autoit][/autoit] [autoit]While(1)
Sleep(50)
$msg = GUIGetMsg()
Select
Case $msg = $ReadMemory
;open the process
$ProcessInformation = _MemoryOpen($ProcessID)
;read the memory
$Number = _MemoryRead(0xF13CD8, $ProcessInformation)
$Text = _MemoryRead(0xF13350, $ProcessInformation, 'char[10]')
;close the process
_MemoryClose($ProcessInformation)
MsgBox(4096, "Data Read", $Number & @CRLF & $Text)
Case $msg = $WriteMemory
;open the process
$ProcessInformation = _MemoryOpen($ProcessID)
;write the memory
_MemoryWrite(0xF13CD8, $ProcessInformation, $DecimalWrite)
_MemoryWrite(0xF13350, $ProcessInformation, $ASCIIWrite, 'char[10]')
;read the memory
$Number = _MemoryRead(0xF13CD8, $ProcessInformation)
$Text = _MemoryRead(0xF13350, $ProcessInformation, 'char[10]')
;close the process
_MemoryClose($ProcessInformation)
;reset data to be written
If $Number = 123456789 Then
$DecimalWrite = 987654321
Else
$DecimalWrite = 123456789
EndIf
If $Text = 'Coming In' Then
$ASCIIWrite = 'Going Out'
Else
$ASCIIWrite = 'Coming In'
EndIf
Case $msg = $CloseGUI
Exit
EndSelect
WEnd
Funktioniert dieses Beispiel bei euch?
Falls ja, weiss zufällig jemand weshalb ich beim Value nichts ausgegeben bekomme?
Gruß
Manta