Jump to content

Repeat Script


Reptos
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...