Code: Select all
i=1
#a::
loop, i
{
send {z 50}
}
i+=1
Code: Select all
i=1
#a::
loop, i
{
send {z 50}
}
i+=1
Code: Select all
#a::SendInput % "{z " (i := i ? i + 50 : 50) "}"
Code: Select all
i = 2
#a::
Loop, i
Send x
Loop, %i%
Send y
Return
Due to the need to support file-pattern loops, Count cannot be an expression. However, as with all non-expression parameters, an expression can be forcibly used by preceding it with a % and a space. For example: Loop % Count + 1. In such cases, the expression is evaluated only once, right before the loop begins.
Code: Select all
#a::
loop, %i%
{
send {z 50}
}
i = i + 1;
return
Code: Select all
i = 0
#a::
i := i + 1
Loop, %i%
SendInput {z 50}
Return