Tach,
ich wollte fragen wie ich einen multipointer einbinden kann in einen autoit script, meine ersten anfänge sehen so aus:
der Pointer in CE sieht so aus:
[Only registered and activated users can see links. Click Here To Register...]
Gelöst :
und das script in die pointer.au3 udf einfügen:
ich wollte fragen wie ich einen multipointer einbinden kann in einen autoit script, meine ersten anfänge sehen so aus:
Code:
#include NomadMemory $GamePid1 = ProcessExists ("mc2.exe") $GameHandle1 = _MemoryOpen($GamePid1) $BaseAdresse1 = 0x0174D81 Dim $nitrofr[6] $nitrofr[0]=0 $nitrofr[1]= 0x10 $nitrofr[2]= 0x1d0 $nitrofr[3]= 0x0 $nitrofr[4]= 0x10 $nitrofr[5]= 0x0 _MemoryPointerWrite($BaseAdresse1,$GameHandle1,$nitrofr, $BaseAdresse1)
[Only registered and activated users can see links. Click Here To Register...]
Gelöst :
PHP Code:
#RequireAdmin
#include <Pointer.au3>
HotKeySet("{F1}", "_Read")
$PID = ProcessExists("mc2.exe")
If $PID > 0 Then
$Handle = _MemoryOpen($PID)
$Address = _MemoryModuleGetBaseAddress(ProcessExists("mc2.exe"), "mc2.exe")
$Address = "0x" & Hex($Address + Dec("174D81"))
Dim $Offset[6] = [0, 0, 0x10, 0, 0x1D0, 0x10]
Else
Exit
EndIf
While True
Sleep(10)
WEnd
Func _Read()
$Read = _MemoryPointerRead($Address, $Handle, $Offset, "float")
MsgBox(0, "", $Read[1])
EndFunc
und das script in die pointer.au3 udf einfügen:
PHP Code:
Func _MemoryModuleGetBaseAddress($iPID, $sModule)
If Not ProcessExists($iPID) Then Return SetError(1, 0, 0)
If Not IsString($sModule) Then Return SetError(2, 0, 0)
Local $PSAPI = DllOpen("psapi.dll")
Local $hProcess
Local $PERMISSION = BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020)
If $iPID > 0 Then
Local $hProcess = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $iPID)
If $hProcess[0] Then
$hProcess = $hProcess[0]
EndIf
EndIf
Local $Modules = DllStructCreate("ptr[1024]")
Local $aCall = DllCall($PSAPI, "int", "EnumProcessModules", "ptr", $hProcess, "ptr", DllStructGetPtr($Modules), "dword", DllStructGetSize($Modules), "dword*", 0)
If $aCall[4] > 0 Then
Local $iModnum = $aCall[4] / 4
Local $aTemp
For $i = 1 To $iModnum
$aTemp = DllCall($PSAPI, "dword", "GetModuleBaseNameW", "ptr", $hProcess, "ptr", Ptr(DllStructGetData($Modules, 1, $i)), "wstr", "", "dword", 260)
If $aTemp[3] = $sModule Then
DllClose($PSAPI)
Return Ptr(DllStructGetData($Modules, 1, $i))
EndIf
Next
EndIf
DllClose($PSAPI)
Return SetError(-1, 0, 0)
EndFunc