Jump to content

KentNguyen

Members
  • Posts

    7
  • Joined

  • Last visited

KentNguyen's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. come on, no 1? .... pls i'm sr about my bad english..
  2. sr if i ask some stupid question... i tried to get some simple infomation of a game by using NomadMemory, i used CheatEngine5.5 to get target's address but i dont know what should be target's address in this picture, i tried to use 0x... with these in the red boxes but none of them worked, can some1 help me out pls, thanks a lot, here is my csript #include-once #include <GUIListView.au3> #include <GUIConstants.au3> #include <GuiListView.au3> #Include <GuiConstants.au3> #include <StaticConstants.au3> Opt ("WinTitleMatchMode",2) Opt("GUIOnEventMode", 1) Func _MEMORYOPEN($IV_PID, $IV_DESIREDACCESS =0x1F0FFF, $IV_INHERITHANDLE = 1) If Not ProcessExists($IV_PID) Then SetError(1) Return 0 EndIf Local $AH_HANDLE[2] = [DllOpen("kernel32.dll") ] If @error Then SetError(2) Return 0 EndIf Local $AV_OPENPROCESS = DllCall($AH_HANDLE[0], "int", "OpenProcess", "int", $IV_DESIREDACCESS, "int", $IV_INHERITHANDLE, "int", $IV_PID) If @error Then DllClose($AH_HANDLE[0]) SetError(3) Return 0 EndIf $AH_HANDLE[1] = $AV_OPENPROCESS[0] Return $AH_HANDLE EndFunc Func _MEMORYREAD($IV_ADDRESS, $AH_HANDLE, $SV_TYPE = "dword") If Not IsArray($AH_HANDLE) Then SetError(1) Return 0 EndIf Local $V_BUFFER = DllStructCreate($SV_TYPE) If @error Then SetError(@error + 1) Return 0 EndIf DllCall($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DllStructGetPtr($V_BUFFER), "int", DllStructGetSize($V_BUFFER), "int", "") If Not @error Then Local $V_VALUE = DllStructGetData($V_BUFFER, 1) Return $V_VALUE Else SetError(6) Return 0 EndIf EndFunc Func _MEMORYWRITE($IV_ADDRESS, $AH_HANDLE, $V_DATA, $SV_TYPE = "dword") If Not IsArray($AH_HANDLE) Then SetError(1) Return 0 EndIf Local $V_BUFFER = DllStructCreate($SV_TYPE) If @error Then SetError(@error + 1) Return 0 Else DllStructSetData($V_BUFFER, 1, $V_DATA) If @error Then SetError(6) Return 0 EndIf EndIf DllCall($AH_HANDLE[0], "int", "WriteProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DllStructGetPtr($V_BUFFER), "int", DllStructGetSize($V_BUFFER), "int", "") If Not @error Then Return 1 Else SetError(7) Return 0 EndIf EndFunc Func _MEMORYCLOSE($AH_HANDLE) If Not IsArray($AH_HANDLE) Then SetError(1) Return 0 EndIf DllCall($AH_HANDLE[0], "int", "CloseHandle", "int", $AH_HANDLE[1]) If Not @error Then DllClose($AH_HANDLE[0]) Return 1 Else DllClose($AH_HANDLE[0]) SetError(2) Return 0 EndIf EndFunc GUICreate("Practice",200,200,-1,-1) GUISetState() While 1 $msg=GUIGetMsg() If $msg=$GUI_EVENT_CLOSE Then Exit EndIf $title=WinGetTitle("AlyKulun","") $memid=_MEMORYOPEN($title) $hp=GUICtrlCreateLabel("",10,10,100,20) GUICtrlSetData($hp,"HP: "&GETHP()) WEnd Func GETHP() Return _MEMORYREAD(0x044EDA64,$memid) EndFunc
  3. i dont get it, i dont need to change anything,right?, my statement is _SendKeys($window, "!z") , $hWnd=Wingethandle($window) , and $window is the title of the window which i want to send key to, but it doesnt work, i'm newbie and not so good at English so, can some1 help me out? pls....
  4. thank you wolf, finally i got it... it works, thanks a lot
  5. it doesnt work either, it does show that the script is running on tray tip but nothing happen in the window which i want to send keys to, i thought it could be problem about getting wintitle but its strange, because it's ok if i use counting and set sleep time between counts, but that way is not so good, so i wanna do with TimerDiff/Init ... anyway, thank for ur help wolf, got any other idea, oh this is bad, i'm really confusing
  6. thank for reply but it doesnt work, what i want to do is make 2 separate time counting and do 2 separate things in different times so i make my $time into $timeatt and $timemove, it doesnt work either, the problem is when i take out TimerDiff and TimerInit, do another way and it's all good, when i use TimerDiff and TimerInit, there is no error but nothing happen, can some1 help me pls? #include-once #include <GUIListView.au3> #include <GUIConstants.au3> #include <GuiListView.au3> #Include <GuiConstants.au3> TraySetIcon ("icon.ico") Opt("TrayAutoPause",0) Opt("WinTitleMatchMode", 2) Opt("TrayMenuMode",0) Opt("SendKeyDownDelay", 50) Opt("MouseClickDownDelay",50) Opt("PixelCoordMode", 0) Global $Paused Global $timea Global $timem GUICreate("Auto Game",240,170,-1,-1) GUICtrlCreateTab(10,10,220,150) GUICtrlCreateTabItem("Char#1") GUICtrlCreateLabel("UID",20,45,30,20) $uid=GUICtrlCreateInput("",60,40,100,20) $att=GUICtrlCreateCheckbox("T? ??ng ??nh",20,80,100,20) GUICtrlSetState(-1,$GUI_CHECKED) $move=GUICtrlCreateCheckbox("T? ??ng ch?y",120,80,100,20) GUICtrlSetState(-1,$GUI_CHECKED) $run=GUICtrlCreateButton("Run",20,120,60,20) $hide=GUICtrlCreateButton("Hide",100,120,60,20) $show=TrayCreateItem("Show") $trayexit=TrayCreateItem("Exit") $m=0 $a=0 $timea=0 $timem=0 GUISetState() While 1 $msg=GUIGetMsg() $msg2=TrayGetMsg() If $msg=$GUI_EVENT_CLOSE Then Exit EndIf If $msg=$hide Then GUISetState(@SW_HIDE) EndIf If $msg2=$show Then GUISetState(@SW_SHOW) EndIf If $msg2=$trayexit Then Exit EndIf If $msg=$run Then TraySetToolTip ( "Char : "& GUICtrlRead($uid)) $sub= GUICtrlRead($uid) $tit= WinGetTitle($sub, "") $m=GUICtrlRead($move) $a=GUICtrlRead($att) EndIf RUNX() WEnd Func RUNX() While 1 $msg=GUIGetMsg() $show=TrayCreateItem("Show") If $msg=$hide Then GUISetState(@SW_HIDE) EndIf If $msg2=$show Then GUISetState(@SW_SHOW) EndIf If $msg=$GUI_EVENT_CLOSE Then Exit If TimerDiff($timea)>=5000 Then A() $timea=TimerInit() EndIf If TimerDiff($timem)>=3600000 Then B() $timem=TimerInit() EndIf Wend EndFunc Func A() If $a=1 Then controlsend($tit,"","","!z") Sleep(1000) EndIf EndFunc Func B() If $m=1 Then _MOUSECLICKPLUS($tit, "left", 780, 520, 1) Sleep(700) _MOUSECLICKPLUS($tit, "left", 620, 480, 1) Sleep(700) _MOUSECLICKPLUS($tit, "left", 780, 520, 1) Sleep(700) EndIf EndFunc Func _MOUSECLICKPLUS($WINDOW, $BUTTON = "left", $X = "", $Y = "", $CLICKS = 1) Local $MK_LBUTTON = 1 Local $WM_LBUTTONDOWN = 513 Local $WM_LBUTTONUP = 514 Local $MK_RBUTTON = 2 Local $WM_RBUTTONDOWN = 516 Local $WM_RBUTTONUP = 517 Local $WM_MOUSEMOVE = 512 Local $I = 0 Select Case $BUTTON = "left" $BUTTON = $MK_LBUTTON $BUTTONDOWN = $WM_LBUTTONDOWN $BUTTONUP = $WM_LBUTTONUP Case $BUTTON = "right" $BUTTON = $MK_RBUTTON $BUTTONDOWN = $WM_RBUTTONDOWN $BUTTONUP = $WM_RBUTTONUP EndSelect If $X = "" Or $Y = "" Then $MOUSECOORD = MouseGetPos() $X = $MOUSECOORD[0] $Y = $MOUSECOORD[1] EndIf For $I = 1 To $CLICKS DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($WINDOW), "int", $WM_MOUSEMOVE, "int", 0, "long", _MAKELONG($X, $Y)) DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($WINDOW), "int", $BUTTONDOWN, "int", $BUTTON, "long", _MAKELONG($X, $Y)) DllCall("user32.dll", "int", "SendMessage", "hwnd", WinGetHandle($WINDOW), "int", $BUTTONUP, "int", $BUTTON, "long", _MAKELONG($X, $Y)) Next EndFunc Func _MAKELONG($LOWORD, $HIWORD) Return BitOR($HIWORD * 65536, BitAND($LOWORD, 65535)) EndFunc
  7. first, i'm sr about my bad english, i got stuck in this script, if i write by anotherway then its ok ,but when i tried to use TimerDiff and TimerInit i got a problem that i cant even know what it is, i did the same as i saw in the forum... pls, help me out pls here is my script
×
×
  • Create New...