Hello to the community,
i read some posts and want to thank all which put time in this hole stuff .. you are my stars
i wrote some autoit stuff and found a autoit chat reader which work with memory reading. *so first thanks to him (pupu is his name)*
i try to read the change of the mouse cursor from normal to lootable so that i know when to click. (i use the nomadmemory reading stuff) *there goes my second thanks*
the problem .. i get a wiered value back .. i check the value with msgbox but only see something like a sqare.
Code:
#include <NomadMemory.au3>
#include <string.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
SETPRIVILEGE("SeDebugPrivilege", 1)
dim $list = ProcessList("wow.exe") ;Find all the processes running spawned by wow.exe
if $list[0][0] = 0 Then
msgbox(0,"Error","Unable to detect WoW.exe" &@lf & "Please makes sure that wow is running before you open this app")
exit
EndIf
$wow = _memoryopen($list[1][1]) ;Select the first process from the list.
Dim $ProPID = $list[1][1]
Global $HPROCESS = _MemoryOpen($ProPID)
$HPROCESS = _MemoryOpen($ProPID)
WinActivate("World of Warcraft")
WinWaitActive("World of Warcraft")
HotKeySet("{F4}", "Loot")
HotKeySet("{F6}","setup")
HotKeySet("{F5}","pause")
HotKeySet("{END}","Quit")
dim $UnPaused
dim $bottom, $right, $left, $top
pause()
Func pause()
while 1=1
sleep(1000)
ToolTip("Paused... F4=Loot, F6=Setup, END=Quit",0,0)
WEnd
EndFunc
Func Loot()
dim $loot[10]
While 1 = 1
ToolTip('Loot! F5 Pause',0,0)
$x = $left
$y = $top
While $y <= $bottom
MouseMove($x, $y, 1)
msgbox(0,"check1","check before mouse check")
$loot[1] = _MEMORYREAD(0x113AAE0, $HPROCESS, "char[2]")
msgbox(0,"check2","check loot falue:" & $loot[1] & "--- ")
if $loot[1] = "16" then
msgbox(0,"check3","right klick")
MouseClick("right")
Sleep(150)
EndIf
$x = $x + 50
If $x >= $right Then
$y = $y + 50
$x = $left
EndIf
WEnd
WEnd
EndFunc
Func setup()
MsgBox(0, "Setup", "set upper left corner / confirm enter")
$upperpos = MouseGetPos()
MsgBox(0, "Setup", "set bottom right corner / confirm enter")
$bottompos = MouseGetPos()
$left = $upperpos[0]
$top = $upperpos[1]
$right = $bottompos[0]
$bottom = $bottompos[1]
MsgBox(0, "Setup", "test of the coords")
Sleep(500)
MouseMove($left, $top, 2)
Sleep(500)
MouseMove($right, $top, 2)
Sleep(500)
MouseMove($right, $bottom, 2)
Sleep(500)
MouseMove($left, $bottom, 2)
Sleep(500)
EndFunc
func Quit()
Exit
EndFunc
would be nice when someone gives me a hint .. and yes i suck .. i wished i were able to reverse engineer (or at least a little bit)
or programm a little bit better
thanks in advanced
sincery spud
*thanks to all like cypher nomad and clever people who bring this to the start*