vivec45 Posted August 1, 2009 Posted August 1, 2009 (edited) Global $looped = 0 While 1 MsgBox(0, "Test", "Test result: " & $looped + 1, 2500) Sleep(1000) WEnd I am using this concept in a script and I want to add "1" to the integer $looped so i can see how many times the loop has ran, and put it in a message (i could do this if i could add to the variable each time), does anyone know how to do this so it doesnt just say "Test result: 1" over and over, i would like it to say "Test result: 1", then "Test result: 2" etc. Thanks everyone, Rob Edited August 1, 2009 by vivec45
DYONISII Posted August 1, 2009 Posted August 1, 2009 (edited) Global $looped = 0 While 1 $looped += 1 MsgBox(0, "Test", "Test result: " & $looped, 2500) Sleep(1000) WEnd or Global $looped = 0 While 1 MsgBox(0, "Test", "Test result: " & loop($looped), 2500) Sleep(1000) WEnd Func loop(ByRef $var) $var += 1 return $var EndFunc Edited August 1, 2009 by DYONISII http://dev.dyonisii.com/
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