Jump to content

Recommended Posts

Posted

Hello, I have problem with script. My script click on point 1, wait 5 sec and click on point 2 etc. I want to search for point 1, when point 1 is visible click on them wait for reach and search for point 2, click on them, wait for reach etc. Is there any option to check if point is reached then go next?

HDCTeu.jpg

#include <Array.au3>

HotKeySet("{HOME}", "START")
HotKeySet("{END}", "_EXIT")


While 1
   Sleep(250)
   WEnd

Func Start()

   $Point1 = 0x44CE57
   $Point2 = 0x0F0FFF
   $Point3 = 0xF50000

   While 1
            $mark1 = PixelSearch(1199, 135, 1304, 27, $Point1)
            $reach1 = PixelSearch(1248, 80, 1254, 86, $Point1)
      If IsArray($mark1) = 1 And IsArray($reach1) = 0 Then
         MouseMove($mark1[0], $mark1[1], 0)
        MouseClick("primary")
        Sleep(5000)
     EndIf
     $mark2 = PixelSearch(1199, 135, 1304, 27, $Point2)
            $reach2 = PixelSearch(1248, 80, 1254, 86, $Point2)
     If IsArray($mark2) = 1 And IsArray($reach2) = 0 Then
         MouseMove($mark2[0], $mark2[1], 0)
        MouseClick("primary")
        Sleep(5000)
     EndIf

         $mark3 = PixelSearch(1199, 135, 1304, 27, $Point3)
            $reach3 = PixelSearch(1248, 80, 1254, 86, $Point3)
     If IsArray($mark3) = 1 And IsArray($reach3) = 0 Then
         MouseMove($mark3[0], $mark3[1], 0)
        MouseClick("primary")
        Sleep(5000)
     EndIf
     WEnd
         EndFunc


Func _EXIT()
    Exit
EndFunc

 

Posted
7 minutes ago, DonTutti said:

Is there any option to check if point is reached then go next?

How do YOU know if point is reached ?

ps.  if this is game related, you better check forum rules,  up there in the stickies, before continuing on this topic.

Posted

Ehh if You think I'm doing some thing to game then ok :) I have only one question and You can close thread. When I use something like this:

If $point = 3 Then
     $mark3 = PixelSearch(1199, 135, 1304, 27, $Point3)
     If IsArray($mark3) = 1 Then
        $reach3 = PixelSearch(1248, 80, 1254, 86, $Point3)
        If IsArray($reach3) = 0 Then
         MouseMove($mark3[0], $mark3[1], 0)
        MouseClick("primary")
        Sleep(250)
        EndIf
     Else
        $point = 1                          
        ExitLoop
     EndIf

Can I go back to line where $point = 1? I thought ExitLoop will work but it isnt ;/

  • Developers
Posted

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.
  :)

  • Developers
Posted
1 hour ago, DonTutti said:

Ehh if You think I'm doing some thing to game then ok :)

Don't think this is funny...  read those forum rules now and stick to them please.

Jos

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.
  :)

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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