I have a loop that goes like this:
Code: Select all
Loop %loop% {
some code here
}
My question is, what value for %loop% will make the loop be infinite? So I know what to add to my drop-down menu, such that "infinite" is also an option.
Thanks!
Code: Select all
Loop %loop% {
some code here
}
Count: How many times (iterations) to perform the loop. If omitted, the Loop continues indefinitely until a break or return is encountered. The built-in variable A_Index contains the number of the current loop iteration.
Hi,mikeyww wrote: ↑30 Jan 2023, 21:13Hello,
If you look at the documentation, you can find the answer quickly.
Loop:Count: How many times (iterations) to perform the loop. If omitted, the Loop continues indefinitely until a break or return is encountered. The built-in variable A_Index contains the number of the current loop iteration.
Code: Select all
Loop {
Code here
} Until a_index = Var1
As mike pointed out... this is an infinite loop
Code: Select all
Loop
{
Tooltip % A_Index
}
Code: Select all
#Requires AutoHotkey v1.1.33
Gui Font, s10
Gui Add, DropDownList, w230 vmax , 1|2|3|Infinite
Gui Add, Button , wp Default, Loop
Gui Show,, Loop
Return
ButtonLoop:
Gui Submit
Loop {
Send x
} Until (A_Index = max)
Return
Esc::ExitApp
No intention of condescending... sorry if it sounded that way... my bad (was intended to be humorous, but failed). And as you pointed out, I did not notice who the OP was using my phone. So my apologies for that as well. I should have kept quiet.