Jump to content

Recommended Posts

Posted

How should i go about repeating this section if@error? I want it to try again if it can not find the PixelSearch then move on to the next Search.

While 1
    $cords = PixelSearch(564, 188,710, 350,0x380030)
   If Not (@error) Then
      MouseClick("Left",$cords[0],$cords[1],1,1)
      EndIf
      If (@error) Then
        ??????
      EndIf

Posted

If i got what you mean this should work.

While 1
    $cords = PixelSearch(564, 188,710, 350,0x380030)
   If Not (@error) Then
      MouseClick("Left",$cords[0],$cords[1],1,1)
      ExitLoop
   EndIf
WEnd

Saludos

Posted

Just repeat the same code, before your line of exitloop.

 

However, are you sure you are not automating a game? In case you do, could you please read the forum rules.

If not, you may want to elaborate your goal of this script.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...