#include <nomadmemory.au3> #include <GUIConstantsEx.au3> #Include <Timers.au3> #include <WindowsConstants.au3> $AllodsProcessName = "MMO A1" $AllodsProcessName = "Справка XP Tweaker Russian Edition" $ProcessID = WinGetProcess($AllodsProcessName,"") SetPrivilege("SeDebugPrivilege", 1) If $ProcessID = -1 Then MsgBox(4096, "Thermo Prime - ERROR", "Failed to detect World of Warcraft running.") Exit EndIf $DllInformation = _MemoryOpen($ProcessID) If @Error Then MsgBox(4096, "ERROR", "Failed to open memory.") Exit EndIf $BotVersion = "0.04" Global $GUITitle = "AO Bot v" & $BotVersion Global $win_main, $mem_label $i = "1" TestGUI() Func TestGUI() $win_main = GUICreate($GUITitle, 200, 200, -1, -1) GUIRegisterMsg($WM_NCHITTEST, 'WM_NCHITTEST') $mem_label = GUICtrlCreateLabel('11', 15, 25, 150, 20, -1, $GUI_WS_EX_PARENTDRAG) GUISetState(@SW_SHOW) _Timer_SetTimer($win_main, 500, '_Update_mem') While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() EndFunc Func _Update_mem($hWnd, $Msg, $iIDTimer, $dwTime) $CurrentHP = (_MemoryRead(0x08747DEC, $DllInformation, 'ptr')) If @Error Then MsgBox(4096, "ERROR", "Failed to read memory.") Exit EndIf $dec = dec(StringTrimLeft($CurrentHP, 2)) ;~ MsgBox(0, "Данные", "HP:" & dec($dec)) ToolTip(dec(StringTrimLeft($CurrentHP, 2)), 50, 30) ;~ Sleep(500) GUICtrlSetData($mem_label, StringFormat($dec)) ;~ Sleep(1000) EndFunc Func WM_NCHITTEST($hWnd, $Msg, $wParam, $lParam) Local $iProc = DllCall('user32.dll', 'int', 'DefWindowProc', 'hwnd', $hWnd, 'int', $Msg, 'wparam', $wParam, 'lparam', $lParam) If $iProc[0] = $HTCLIENT Then Return $HTCAPTION Return $GUI_RUNDEFMSG EndFunc |