DarkProvex Posted August 1, 2011 Share Posted August 1, 2011 (edited) hi to all ^^ im new in the forum and need your help. im programming a bot for a videogame in autoit and not find the intruction for moving cursor to a text found in game screen, im work with memory address for detect text. im attach the code for your analisys expandcollapse popup#include <GUIConstants.au3> #include <NomadMemory.au3> #include <Array.au3> #include <Misc.au3> #include <string.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <Tesseract.au3> #include <WindowsConstants.au3> Opt("WinTextMatchMode", 2) Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 2) WinWait("CABAL", "") If Not WinActive("CABAL", "") Then WinActivate("CABAL", "") WinWaitActive("CABAL", "") Send("{UP 30}") MouseWheel("down",25) $dll = DllOpen("user32.dll") GUICreate("Cabal AutoBOT 3.0 Final Version By Dark Provex") $tittle_b = "CABAL AutoBOT V 3.0 Final Version By Dark Provex" GUISetState () $Proceso1 = WinGetProcess("CABAL") GUICtrlCreateLabel("Ingresa La Direccion Obtenida En Cheat Engine", 40, 30) $Memoria = GUICtrlCreateInput( "0x",40, 50,100) ;aqui se insertaria la address a buscar $Boton1 = GUICtrlCreateButton ("Presiona Para Buscar", 40, 80, 150) $Boton2 = GUICtrlCreateButton ("Iniciar Bot", 120, 300, 150) GUICtrlCreateLabel("En Este Momento Buscas Al Mob Llamado:",40,120) $Mensaje1 = GUICtrlCreateLabel("",80, 150, 500,150) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Boton1 $Mem_Abrir = _MemoryOpen($Proceso1) $Mem_Leer = _MemoryRead(GUICtrlRead($Memoria), $Mem_Abrir, "char[17]") ;aqui se supone que se lee el valor GUICtrlSetFont(-1, 16, Default, "Arial") GUICtrlSetColor(-2, "0xff0000") GUICtrlSetData($Mensaje1,$Mem_Leer ) ; aqui deberia mostrar que bicho estas buscando Case $msg = $boton2 $Pickup = 0 Global $lastaction = 0 $move = WinGetText("",$mem_leer) While $Pickup = 0 Sleep ( 250 ) If _IsPressed("23", $dll) Then If MsgBox(4, $tittle_b, "Estas Seguro Que Deseas Salir? ") == 6 Then DllClose($dll) _MemoryClose($Mem_Abrir) Exit ExitLoop EndIf Else WinActivate("CABAL", "") If StringInStr($mem_leer , "Garlie") Then Call("ataque") Else call("buscando") endif endif WEnd _MemoryClose($Mem_Abrir) EndSelect WEnd EndIf Func Buscando() $cabalx = 718 $cabaly = 1024 $Randomcabalx = Random(0,$cabalx,1) $Randomcabaly = Random(0,$cabaly,1) MouseClick("left",$Randomcabaly,$Randomcabalx) EndFunc Func Ataque() Send("{space 5}") Send("1") sleep(10) Send("2") sleep(10) Send("3") sleep(10) send("1") sleep(10) send("2") sleep(10) Send("6") sleep(10) send("7") sleep(10) Send("8") EndFunc in this par i need insert the mouse movement and click If StringInStr($mem_leer , "Garlie") Then Call("ataque") im waiting for your response thanks. best regards and congratulations for this excelent forum. Edited August 1, 2011 by DarkProvex Link to comment Share on other sites More sharing options...
Developers Jos Posted August 1, 2011 Developers Share Posted August 1, 2011 im programming a bot for a videogame in autoit and not find the intruction for moving cursor to a text found in game screen, im work with memory address for detect text.Please read the forum rules first. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts