Sign in to follow this  
Followers 0
erezlevi

loop using steps in autoit

4 posts in this topic

hi,

is there a way to loop via the steps in the autoit scrip editor:

I would like to return to the step number 1 (where $i=0) when the IF function at step 6 is true. meaning restarting the script allover again.

1 $i=0

2 while $i<1

3 $test=clipget ()

4 $test1=stringinstr ($test,"Bank:",1)

5

6 If $test1=0 Then

7

8 Else

9 MsgBox (0,"found!:",$test)

10 EndIf

11 WEnd

Share this post


Link to post
Share on other sites



For $i = 1 To $n Step 1
...
Next

That works?


I can do signature me.

Share this post


Link to post
Share on other sites

For $i = 1 To $n Step 1
...
Next

That works?

first, thanks for your help.

I found the keyword i was looking for it is "continue loop". I can't understand why it is working duo. the logic seems to be worng but it is working now:

$i=0

while $i<1

$test=clipget ()

$test1=stringinstr ($test,"Bank:",1)

If $test1=0 Then

ContinueLoop

Else

MsgBox (0,"found!:",$test)

EndIf

WEnd

while $i<1 means endless loop, and if $test1 have the word "Bank:" in it, it will display a msgbox containing the sentence. but if it doesn't have it then it will loop forever. I can't understand why the ContinueLoop here actually continues the whole loop like I wants and not the If - Else IF only.

Share this post


Link to post
Share on other sites

ContinueLoop skips rest of loop and goes back to beggining


I can do signature me.

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  
Followers 0