Jump to content

Autoit Nead Help - (Locked)


Czogi
 Share

Recommended Posts

Hi, I am new here and sorry if I will do anything wrong.
So I was trying to write a GameBot using Autoit but I got this error (This is my first time using Autoit ): image.png.18d8de6cdd6ad4e72a32c0c5cad5d8d2.png

Code:

#include <ImageSearch2015.au3>
#include <ScreenCapture.au3>

HotKeySet("{f1}","myExit")

$x1=0
$y1=0
$var=2
$iLeft=1047
$iTop=127
$iRight=1087
$iBottom=139

$picture = "C:\Users\macie\source\repos\BotMArgo\BotMArgo\bin\Debug\monster.png"
;Picture of monster to find on screen


  Do
Do
$result = _ImageSearch($picture,1,$x1,$y1,0,0)

ConsoleWrite($result)
Until $result=1;

If $result=1 Then

   MouseMove($x1,$y1,500)
   MouseClick("left")
   Sleep(1500)

   Do
   $search = _ImageSearchArea(@MyDocumentsDir & "\screen.png", 1, $iLeft,$iTop,$iRight,$iBottom, $x, $y, 0)
   ;Check if character is moving
   ConsoleWrite($search)
   Until $search=1
 If $searchi=1 Then
      Send("r")

   Else
      MsgBox(0,"MSG","End")
   EndIf

Else
   MsgBox(0,"MSG","End")

EndIf
   Until $var=100
Func myExit()
   Exit
EndFunc

If anyone can solve this I will be grateful

Thank You.monster.png.03441261053ec925fd5f74c6089e0971.png

screen.png

Link to comment
Share on other sites

  • Developers

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...