onestcoder Posted May 25, 2007 Share Posted May 25, 2007 How can I loop this in a function Func _Startwait() GUICtrlSetData($statusoutput, 'Wait.') Sleep(500) GUICtrlSetData($statusoutput, 'Wait..') Sleep(500) GUICtrlSetData($statusoutput, 'Wait...') Sleep(500) GUICtrlSetData($statusoutput, 'Wait....') Sleep(500) GUICtrlSetData($statusoutput, 'Wait.....') Sleep(500) GUICtrlSetData($statusoutput, 'Wait.') Sleep(500) GUICtrlSetData($statusoutput, 'Wait..') Sleep(500) GUICtrlSetData($statusoutput, 'Wait...') Sleep(500) GUICtrlSetData($statusoutput, 'Wait....') Sleep(500) GUICtrlSetData($statusoutput, 'Wait.....') Sleep(500) EndFunc ;==>_Startwait Need a website: http://www.iconixmarketing.com Link to comment Share on other sites More sharing options...
GMK Posted May 25, 2007 Share Posted May 25, 2007 (edited) What about using a Do...Until loop? Do _StartWait Until...<whatever action>. (Then you'd only need the function to be half as long.) Edited May 25, 2007 by GMK Link to comment Share on other sites More sharing options...
xzaz Posted May 25, 2007 Share Posted May 25, 2007 #include <Array.au3> #include <GUIConstants.au3> $Array = _ArrayCreate("",".","..","...","....",".....") Dim $Array GuiCreate("hi") $statusoutput = GUICtrlCreateInput("",100,5,200,25) $Click = GUICtrlCreateButton("Click",5,5) GuiSetState() While 1 $msg = GUIGetMsg() if $msg = $click Then _Startwait() EndIf Wend Func _Startwait() While 1 For $i = 1 To 5 GUICtrlSetData($statusoutput, $Array[$i]) Sleep(500) next Wend EndFunc ;==>_Startwait It can be simpeler/faster i think Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
GaryFrost Posted May 25, 2007 Share Posted May 25, 2007 (edited) You mean something like? Func _Startwait() For $x = 1 To 2 $dot = "" For $y = 1 To 5 $dot &= "." GUICtrlSetData($statusoutput, 'Wait' & $dot) Sleep(500) Next Next EndFunc ;==>_Startwait Edited May 25, 2007 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
onestcoder Posted May 25, 2007 Author Share Posted May 25, 2007 Works great THANK YOU!!! Need a website: http://www.iconixmarketing.com 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