Jump to content

How do i make script go back lines


Recommended Posts

i want my script to return to a specific line and loop until it works

example

line 17 -ScriptScriptScriptScriptScriptScriptScriptScriptScriptScript

line 18 -ScriptScriptScriptScriptScriptScriptScriptScriptScriptScript

line 19 -ScriptScriptScriptScriptScriptScriptScriptScriptScriptScript

line 20 -pixelsearch(629,222,835,396,0xFB1A15,10)

line 21 -If not @error then

line 22 -ScriptScriptScriptScriptScriptScriptScriptScriptScriptScript

line 23 -elseif

line 24 - GO BACK TO LINE 20( until it does work)

Is there a way to script this GO BACK TO LINE 20( until it does work) please explain TY

Edited by Dtvscrotes
Link to comment
Share on other sites

  • Moderators

If you're in a loop, then you can do variable conditioning...

Line 2 If var = xyz Then do somethng

Line 3 If var = abc Then do something/var = xyz

Or if you're in a loop, and somewhere in that loop you want to start back at the beginning of the loop, just use "ContinueLoop", which will restart the loop from that line.

Edit:

In your case, you would do a nested loop though:

While 1

Line 2

Line 3

Line 4... Do

$pixsearch = PixelSearch(etc...)

Sleep(10)

Until IsArray($pixsearch)

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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

  • Recently Browsing   0 members

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