Jump to content
Sign in to follow this  

loop using steps in autoit

Recommended Posts


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)


6 If $test1=0 Then


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

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:


while $i<1

$test=clipget ()

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

If $test1=0 Then



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



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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...