revolution Posted May 22, 2009 Share Posted May 22, 2009 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? Link to comment Share on other sites More sharing options...
weaponx Posted May 22, 2009 Share Posted May 22, 2009 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. Link to comment Share on other sites More sharing options...
revolution Posted May 22, 2009 Author Share Posted May 22, 2009 I promise it was my last topic here today.Thanks, weaponx. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now