Jump to content
Sign in to follow this  
Dtvscrotes

How do i make script go back lines

Recommended Posts

Dtvscrotes

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

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
enaiman

Take a look at While/WEnd loops and Do/Until


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
Dtvscrotes

K the Do......Until thing worked ty.

K ty for all the responds

Share this post


Link to post
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
Sign in to follow this  

×