epicfail Posted September 17, 2009 Share Posted September 17, 2009 (edited) thanks guys Edited September 18, 2009 by epicfail Link to comment Share on other sites More sharing options...
ctyankeeinok Posted September 17, 2009 Share Posted September 17, 2009 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. Link to comment Share on other sites More sharing options...
Phaser Posted September 17, 2009 Share Posted September 17, 2009 (edited) $i = 0 $x = 100; or any number you want While $i <= $x ; do what you want here $i = $i + 1 WEnd Edited September 17, 2009 by Phaser Link to comment Share on other sites More sharing options...
epicfail Posted September 17, 2009 Author Share Posted September 17, 2009 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 Link to comment Share on other sites More sharing options...
nf67 Posted September 17, 2009 Share Posted September 17, 2009 Like this...Outside the function:For $Number = 1 to 5 Call("Function") NextIn the function itself:Func Example() For $Number = 1 to 5 Beep(200,200) Sleep(1000) Next EndFunc...perhaps? Link to comment Share on other sites More sharing options...
nf67 Posted September 17, 2009 Share Posted September 17, 2009 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) Link to comment Share on other sites More sharing options...
powerpoison Posted September 17, 2009 Share Posted September 17, 2009 i would make it like while $check<10 funcname() $check=$check+1 Wend but i am not so professional with it but all the loop i did this way worked... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now