Sign in to follow this  
Followers 0
revolution

Repeating

3 posts in this topic

Hello again,

I have problem with "for $i= 1 to xx" command

I've wrote something like that:

$ilosc = InputBox("Repeats", "How many repeats of script?", "", "")
$backspace = InputBox("Repeats", "How many commands 2?", "", "")
for $i= 1 to $ilosc
Commdand1
Commdand1
Commdand1
    for $i= 1 to $backspace
Command2
    next
Commdand1
Commdand1
next
MsgBox( 0, "Done", "Done")

and script repeats Commands2 (for $i= 1 to $backspace) but next all script (for $i= 1 to $ilosc) doesn't repeat despite appearing MsgBox.

What's wrong with the code?

Share this post


Link to post
Share on other sites



You can't use the same increment variable for the inner and outer loop. Use $i for the outer and $v for the inner or something like that.

Share this post


Link to post
Share on other sites

I promise it was my last topic here today.

Thanks, weaponx.

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