Jump to content

AZPERRY

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by AZPERRY

  1. Right guy's i have progressed. My issue now is that it doesn't actually click on the image. The image is just on the desktop. HotKeySet("{ESC}", "MyExit") #include "ImageSearch.au3" Func MyExit() MsgBox(0, "Ending") Exit EndFunc ;==>MyExit $x1=0 $y1=0 While 1 _click() WEnd Func _click() $pump = "‪C:\Users\Perrya\Desktop\Autoit\pump.png" $pump1 = _ImageSearch($pump,1,$x1,$y1,0,0) ConsoleWrite("Starting search" & @CRLF) if $pump1 = 1 then ConsoleWrite("found pump" & @CRLF) MouseClick($pump1) Sleep(100) EndIf EndFunc
  2. still same error 😐
  3. #include "Image_Search.au3" $x1=0 $y1=0 $pump = _ImageSearch("pump.png",1,$x1,$y1,0)? if $result=1 Then MouseMove($x1,$y1,3) Mouseclick("left",$x1,$y1,3) Else MsgBox(0,"Not Found","Image not found...") EndIf ok im doing something wrong here as i cant even get this to work......... $pump = _ImageSearch("pump.png",1,$x1,$y1,0)? $pump = ^ ERROR >Exit code: 1 Time: 0.104
  4. In the same location as script.
  5. #include <ImageSearch.au3> that gives me same error but with the # ?
  6. (3) : ==> Unknown function name.: include <ImageSearch.au3> ^ ERROR >Exit code: 1    Time: 0.1013
  7. Just a simple click on a image. It compiles. But doesnt execute.. Says invalid function
  8. Hello there AutoIT users. I have used Auto it but its been a few years and most my time is working on PLC logic controllers. Can i ask what is wrong with my code here please? HotKeySet("{ESC}", "Exit") include <ImageSearch.au3> Func MyExit() MsgBox(0, "Ending") Exit EndFunc ;==>MyExit While 1 _click() WEnd Func _click() ConsoleWrite("Starting search" & @CRLF) $pump = _ImageSearch('pump.png', 1, $x, $y, 100) if $pump True then ConsoleWrite("found pump!" & @CRLF) MouseClick("left", $pump) Sleep(100) EndIf EndFunc
  9. its ok I solved this issue
  10. the Script runs but doesn't seem to find the image as console repeats starting to look any ideas? Func _findtile() ConsoleWrite("Starting to look" & @CRLF) $Tile = _ImageSearch('tile.png', 0, $x, $y, 0) If $Tile = 1 Then ConsoleWrite("moving tile" & @CRLF) MouseClick("left", $x, $y, 1, 10) MouseClick("left", 255, 871, 2, 10) EndIf EndFunc ;==>_findtile
  11. Please help :/ ;TIB hotkeyset ("{`}", "MyExit") Global $attacking = false; while(1) winactivate("The Infinite Black") ;find a enemy $pix = Pixelsearch (680,48,807,88,0x8c2231,5) if not (@error) Then ;click and attack enemy mouseclick("left", $pix(0), $pix(1),1,1) sleep(2000) $attacking - True while ($attacking) ;are we still attacking enemy $isattacking = Pixelsearch (680,48,807,88,0xf4fef6,1) if not (@error) Else $attacking = False wend func MyExit () msgbox(0, "Ending","Bot has exited")` EndFunc
×
×
  • Create New...