Jump to content

Recommended Posts

Posted

Either put the call to the function in a For...Next loop or loop within the function with a For...Next loop. Look in the help under Loop Statements in the Language Reference section.

Posted (edited)

$i = 0

$x = 100; or any number you want

While $i <= $x

; do what you want here

$i = $i + 1

WEnd

Edited by Phaser
Posted

yeah but i want to makeit i to a func like Loop(10) so i can put it next to what i want to loop

In that case you could also create some kind of UDF of your liking, such as:

Repeat("Example", 5)

;==This is your UDF==
Func Repeat($FunctionName, $LoopAmount)
    For $LoopNumber = 1 to $LoopAmount
    Call($FunctionName)
    Next
EndFunc
;==End of UDF==

Func Example()
            MsgBox(0,"Example","This is an example function.")
EndFunc

(Edit is won't load? :-S)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...