There are two endless loops:
Code: Select all
Loop (first)
{
Loop (second)
{
....
if
{
*If this if is done more than N times, exit the second loop and return to the first loop*
break
{
else
{
....
}
}
}
Help ))
Code: Select all
Loop (first)
{
Loop (second)
{
....
if
{
*If this if is done more than N times, exit the second loop and return to the first loop*
break
{
else
{
....
}
}
}
can you explain a little bit more ?Kobaltauge wrote: ↑07 Sep 2020, 16:26I would use an index variable. You can define for every loop a separate one. Increase it and break at your defined counter.
Code: Select all
counter_first := 0
Loop, 100
{
MsgBox,,,First %counter_first%
counter_second := 0
Loop, 100
{
MsgBox,,, Second %counter_second%
if counter_second > 9
Break
counter_second += 1
}
if counter_first > 10
Break
counter_first += 1
}
thank you very much, kind person!!! Now i understand )Kobaltauge wrote: ↑07 Sep 2020, 17:25Now you have only to know where to reset your counter variables, what are the breaking condition for every loop and how big your steps are.Code: Select all
counter_first := 0 Loop, 100 { MsgBox,,,First %counter_first% counter_second := 0 Loop, 100 { MsgBox,,, Second %counter_second% if counter_second > 9 Break counter_second += 1 } if counter_first > 10 Break counter_first += 1 }
In this example the "second" loop, loops 10 times for every "first" loop. The loops are set to 100. But you could use an endless loop to.
hth
Users browsing this forum: No registered users and 50 guests