vbgunz
22nd March 2005 06:23 UTC
How Do You Make The Same Loop, Loop X Amount of Times?
I've across the need for a loop in which will loop something very simple (checking for file existence). BUT, if the file never comes into existence I need to escape the infinite horror.
How do you loop the same exact loop yet only do it an x amount of times?
Thanks for any help on this!
Afrow UK
22nd March 2005 08:43 UTC
!define LoopCount 100
Push $R0
StrCpy $R0 0
Loop:
# do stuff here
IntOp $R0 $R0 + 1
StrCmp $R0 ${LoopCount} 0 Loop
Pop $R0
!undef LoopCount
-Stu
vbgunz
22nd March 2005 10:38 UTC
Thank you Afrow, it is very appreciated. your solution is exactly what it was I needed and it definitely looks better than what I was working on ;)
Thanks again!
kichik
22nd March 2005 18:35 UTC
And with LogicLib:
${For} $R1 1 100
# something...
${Next}