Sign in to follow this  
Followers 0
TwilightN3ro

Question about loop

3 posts in this topic

Hey guys,

If been looking around but i cant find my answer, Not sure if it is even possible.

So, Setting my loop for 20 times(Just a random number)

Is it possible to say, After 5 times, Do this, Then return to the loop, After 5 times, Same process. over and over.

Is this possible? Hope someone could help me out with this been bugging me for a while now lol:P

Thanks;)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Easy!

For $i = 1 To 20 ;loop 20 times

    ConsoleWrite("loop " & $i & @CRLF)

    If Mod($i,5) == 0 Then

        ; do something here every 5th loop
        ConsoleWrite("something extra! " & @CRLF)

    EndIf

Next
Edited by bwochinski

Share this post


Link to post
Share on other sites

Ah wonderfull thank you! :unsure:

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