I've searched around most possibilities i found was img search which doesnt work cuz of the color change.. ^^
Any help are HIGHLY appreciatet.
-Dequality.
]]>When looking at PixelGetColor (
Please login or register to see this link.
) you can see it has an optional parameter of setting window handle for the window the pixel is being read from. Thus it is logical to me that it is possible to read pixels from windows that are not focused (i.e not minimized, but behind another window).But having tried numerous times, i can't get it to work like i need it to.
Am i wrong? Does the function only read visible pixels only? Why the window handle option then? And if so, is there any other method you could recommend (that also involves pixel recognition)
]]>I'd be really thankful if someone could tell me, why _MemoryGetBaseAdress is returning 0. (see code at the bottom)
I'm running Win7 32Bit to prevent any 64Bit Problems.
;===================================================================================================; Function........: _MemoryGetBaseAddress($ah_Handle, $iHD);; Description.....: Reads the 'Allocation Base' from the open process.;; Parameter(s)....: $ah_Handle - An array containing the Dll handle and the handle of the open; process as returned by _MemoryOpen().; $iHD - Return type:; |0 = Hex (Default); |1 = Dec;; Requirement(s)..: A valid process ID.;; Return Value(s).: On Success - Returns the 'allocation Base' address and sets @Error to 0.; On Failure - Returns 0 and sets @Error to:; |1 = Invalid $ah_Handle.; |2 = Failed to find correct allocation address.; |3 = Failed to read from the specified process.;; Author(s).......: Nomad. Szhlopp.; URL.............:Please login or register to see this link.
Note(s).........: Go to Www.CheatEngine.org for the latest version of CheatEngine.;===================================================================================================Func _MemoryGetBaseAddress($ah_Handle, $iHexDec = 0) Local $iv_Address = 0x00100000 Local $v_Buffer = DllStructCreate('dword;dword;dword;dword;dword;dword;dword') Local $vData Local $vType If Not IsArray($ah_Handle) Then SetError(1) Return 0 EndIf DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer)) If Not @Error Then $vData = Hex(DllStructGetData($v_Buffer, 2)) $vType = Hex(DllStructGetData($v_Buffer, 3)) While $vType <> "00000080" DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer)) $vData = Hex(DllStructGetData($v_Buffer, 2)) $vType = Hex(DllStructGetData($v_Buffer, 3)) If Hex($iv_Address) = "01000000" Then ExitLoop $iv_Address += 65536 WEnd If $vType = "00000080" Then SetError(0) If $iHexDec = 1 Then Return Dec($vData) Else Return $vData EndIf Else SetError(2) Return 0 EndIf Else SetError(3) Return 0 EndIfEndFunc ;==>_MemoryGetBaseAddress
#include <NomadMemory.au3>#RequireAdminSetPrivilege("SeDebugPrivilege", 1)$ModuleName = "Wow.exe"$pid = ProcessExists($ModuleName)Global $BaseOffset = "00A29D28"Global $HPOffset[3] $HPOffset[0] = 0 $HPOffset[1] = 120 $HPOffset[2] = 40$handle = _MemoryOpen($pid)$Base = _MemoryGetBaseAddress($handle, 1); + $BaseOffset$BaseAddr = "0x" & Hex($Base + $BaseOffset)_MemoryClose($handle)MsgBox(0,"Test", "Modulname: " & $ModuleName & @CRLF & "Base: " & $Base & @CRLF & "Playerbase: " & $BaseAddr)]]>
it,s a pretty simple script that checks if the "start" button is enabled
when it is it clicks on start > run demo
left key to start right to close the script
]]>HotKeySet("{left}","start")
HotKeySet("{right}","end")
While 1
Sleep(1000)
WEnd
Func start()
Local $Data = ProcessExists('ReBot.exe')
While 1
$1 = ControlGetText(_GetHwndFromPID($Data),"","[CLASS:WindowsForms10.BUTTON.app.0.3551b1b_r13_ad1; INSTANCE:13]")
If $1 = "Start" Then
ControlClick(_GetHwndFromPID($Data),"","[CLASS:WindowsForms10.BUTTON.app.0.3551b1b_r13_ad1; INSTANCE:13]","left")
Sleep(500)
ControlClick("Premium Bot","","[CLASS:WindowsForms10.BUTTON.app.0.3551b1b_r13_ad1; INSTANCE:2]","left")
EndIf
Sleep(10000)
WEnd
EndFunc
Func end()
Exit
EndFunc
Func _GetHwndFromPID($PID)
$hWnd = 0
$stPID = DllStructCreate("int")
Do
$winlist2 = WinList()
For $i = 1 To $winlist2[0][0]
If $winlist2[$i][0] <> "" Then
DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $winlist2[$i][1], "ptr", DllStructGetPtr($stPID))
If DllStructGetData($stPID, 1) = $PID Then
$hWnd = $winlist2[$i][1]
ExitLoop
EndIf
EndIf
Next
Sleep(100)
Until $hWnd <> 0
Return $hWnd
EndFunc ;==>_GetHwndFromPID
It SHOULD work but all it does is input the acountName and then stops with the error
$o_object.fireEvent("OnChange")$o_object.fireEvent("OnChange")^ ERROR
If I enter $password, "PASSWORD" before the $username it does the same thing except this time it only enters the password. Weird stuff...
#include <IE.au3>Call ("signIn")Func SignIn ()Global $oIE = _IECreate ("https://eu.battle.net/login/en")Local $username =_IEGetObjByName ($oIE,"accountName")Local $password = _IEGetObjByName ($oIE,"password")_IEFormElementSetValue ($username, "[email protected]")_IEFormElementSetValue ($password, "PASSWORD")EndFunc]]>
Please login or register to see this link.
refresh button list,s all running wow processes
get window button get the current aktive window with a 5 sec delay
reduced my wow cpu usage by 50% on ultra settings
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>#include <GuiListView.au3>AutoItSetOption("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
$Form1 = GUICreate("Window Hider", 200, 260, 361, 346)
$ListView = GUICtrlCreateListView("Process|ID",0,10,200,150)
$Button1 = GUICtrlCreateButton("Get Window", 100, 170, 75, 25)
$Button2 = GUICtrlCreateButton("Hide", 100, 210, 75, 25)
$Button3 = GUICtrlCreateButton("Show", 10, 210, 75, 25)
$Button4 = GUICtrlCreateButton("Refresh",10,170,75,25)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Sleep(5000)
$Hwnd = WinGetProcess("[active]")
$lol = _PIDGetProcessName($Hwnd)
GUICtrlCreateListViewItem($lol & '|' & $Hwnd,$ListView)
Case $Button2
$iSelect = ControlListView($Form1, "", $ListView, "GetSelected")
$Pid = ControlListView($Form1, "", $ListView, "GetText", $iSelect,1)
$Hwnd = _GetHwndFromPID($Pid)
WinSetTrans($Hwnd,"",0)
_GUICtrlListView_SetItemText($ListView,$iSelect,"Hidden")
Case $Button3
$iSelect = ControlListView($Form1, "", $ListView, "GetSelected")
$Pid = ControlListView($Form1, "", $ListView, "GetText", $iSelect,1)
$Hwnd = _GetHwndFromPID($Pid)
WinSetTrans($Hwnd,"",255)
$lol = _PIDGetProcessName($Pid)
_GUICtrlListView_SetItemText($ListView,$iSelect,$lol)
Case $Button4
refresh()
EndSwitch
WEnd
Func refresh()
Local $var = ProcessList("wow.exe")
_GUICtrlListView_DeleteAllItems($ListView)
For $i = 1 To $var[0][0]
GUICtrlCreateListViewItem($var[$i][0] & '|' & $var[$i][1] ,$ListView)
Next
EndFunc
Func _GetHwndFromPID($PID)
$hWnd = 0
$stPID = DllStructCreate("int")
Do
$winlist2 = WinList()
For $i = 1 To $winlist2[0][0]
If $winlist2[$i][0] <> "" Then
DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $winlist2[$i][1], "ptr", DllStructGetPtr($stPID))
If DllStructGetData($stPID, 1) = $PID Then
$hWnd = $winlist2[$i][1]
ExitLoop
EndIf
EndIf
Next
Sleep(100)
Until $hWnd <> 0
Return $hWnd
EndFunc ;==>_GetHwndFromPID
Func _PIDGetProcessName($vPID)
$aProcesslist = ProcessList()
For $i = 1 To $aProcesslist[0][0]
If $aProcesslist[$i][1] = $vPID Then Return $aProcesslist[$i][0]
Next
EndFunc ;==>_PIDGetProcess
Download:
Please login or register to see this link.
]]>