Aktuelle Mem Werte in GW

10/30/2008 17:36 Luzifer42#16
Hier noch ne version die eine beliebige ini ausliest die im gleichen verzeichnis ist, und von allen adressen int float und text anzeigt.

Code:
#include <NomadMemory.au3>
#include <Array.au3>
#Include <File.au3>
#include <GUIConstants.au3>
#include <StaticConstants.au3>

$winTitle = "Guild Wars"
$Mem_Open = _MemoryOpen(WinGetProcess($winTitle))
Dim	$width[5]=[70, 120, 75, 75, 180]
Dim	$x[5]
	$x[0]=5
	$x[1]=$x[0]+5+$width[0]
	$x[2]=$x[1]+5+$width[1]
	$x[3]=$x[2]+5+$width[2]
	$x[4]=$x[3]+5+$width[3]
	
GUICreate("Memory Displayer", $x[4]+5+$width[4], 870, 120, 60)
$y=5
GUISetFont(8.5, 800, 4, "Lucida Console")
GUICtrlCreateLabel("Address", $x[0], $y, $width[0], 11, $SS_CENTER)
GUICtrlCreateLabel("Name"   , $x[1], $y, $width[1], 11, $SS_CENTER)
GUICtrlCreateLabel("int"    , $x[2], $y, $width[2], 11, $SS_CENTER)
GUICtrlCreateLabel("float"  , $x[3], $y, $width[3], 11, $SS_CENTER)
GUICtrlCreateLabel("text"   , $x[4], $y, $width[4], 11, $SS_CENTER)

Dim $addresses[1], $labelint[1], $labelfloat[1], $labeltext[1]
$inis = _FileListToArray(".","*.ini",1)
$ini_sections = IniReadSectionNames($inis[1])
$size=0
$y=20
For $s=1 To $ini_sections[0]
	GUISetFont(8.5, 400, 6, "Lucida Console")
	GUICtrlCreateLabel($ini_sections[$s],  $x[1], $y, 200, 11)
	GUISetFont(8.5, 400, 0, "Lucida Console")
	$y=$y+11
    $values = IniReadSection($inis[1], $ini_sections[$s])
	For $k=1 To $values[0][0]
				       GUICtrlCreateLabel($values[$k][1], $x[0], $y, $width[0], 10, $SS_LEFT )
		                       GUICtrlCreateLabel($values[$k][0], $x[1], $y, $width[1], 10, $SS_LEFT )
		_ArrayAdd($labelint  , GUICtrlCreateLabel(0             , $x[2], $y, $width[2], 10, $SS_RIGHT))
		_ArrayAdd($labelfloat, GUICtrlCreateLabel(0             , $x[3], $y, $width[3], 10, $SS_RIGHT))
		_ArrayAdd($labeltext , GUICtrlCreateLabel(0             , $x[4], $y, $width[4], 10, $SS_LEFT ))
		_ArrayAdd($addresses , $values[$k][1]                                                         )
		$size=$size+1
		$y=$y+10
    Next
Next
GUISetState()

While True
	If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
	For $i=1 To $size
		GUICtrlSetData($labelint  [$i], StringFormat("%1d" , _MemoryRead($addresses[$i], $Mem_Open, "long"     )) )
		GUICtrlSetData($labelfloat[$i], StringFormat("%.1f", _MemoryRead($addresses[$i], $Mem_Open, "float"    )) )
		GUICtrlSetData($labeltext [$i],                      _MemoryRead($addresses[$i], $Mem_Open, "wchar[32]")  )
	Next
	Sleep(20)
Wend
_MemoryClose($Mem_Open)
01/02/2009 02:27 NBA#17
Wenn das kommt ist iwas an der ini falsch

edit: Kann man eigentlich pos x und y ueberschreiben, um somit iwas wie ein moveto zu machen? Also als ob man auf eine bestimmte position der karte clicken wuerde?
01/02/2009 11:38 Gabba2#18
Quote:
Originally Posted by NBA View Post
edit: Kann man eigentlich pos x und y ueberschreiben, um somit iwas wie ein moveto zu machen? Also als ob man auf eine bestimmte position der karte clicken wuerde?
Probiers aus.
01/02/2009 15:49 NBA#19
Der Befehl hies memorywrite oder?
01/02/2009 15:52 aLasca#20
jap