EmptySpace Posted June 7, 2012 Share Posted June 7, 2012 How I should count while 1 loops? I know progresson.. but it makes that graphical thing I need only show numbers. How I should do that? Like progress ProgressOn("Progress Meter", "Increments every second", "0 percent") While 1 Sleep(1000) ProgressSet( 1, 1 & " percent") Wend Didnt changed anything from helpfile. Link to comment Share on other sites More sharing options...
JohnOne Posted June 7, 2012 Share Posted June 7, 2012 Use a label. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted June 7, 2012 Share Posted June 7, 2012 quick poor example: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Example1() Exit ; example 1 Func Example1() Local $msg GUICreate("My GUI") ; will create a dialog box that when displayed is centered $hlabel = GUICtrlCreateLabel("0",10,10,100,20) GUISetState(@SW_SHOW) ; will display an empty dialog box For $i = 1 To 100 GUICtrlSetData($hlabel,$i) Sleep(50) Next ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() EndFunc ;==>Example1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
EmptySpace Posted June 7, 2012 Author Share Posted June 7, 2012 How to add this for forever loop? Or just simpliest addFor $i = 1 To 9999999 lol Link to comment Share on other sites More sharing options...
LurchMan Posted June 7, 2012 Share Posted June 7, 2012 (edited) $i = 1 While 1 ;creates an infinite loop $i += 1 WEnd Edited June 7, 2012 by LurchMan Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end. Link to comment Share on other sites More sharing options...
EmptySpace Posted June 7, 2012 Author Share Posted June 7, 2012 Oh, Thanks. Forgot about that... Link to comment Share on other sites More sharing options...
Mechaflash Posted June 7, 2012 Share Posted June 7, 2012 (edited) $sMainText = "Increments every second" ProgressOn("Progress Meter", $sMainText, "0 percent") $i = 0 While $i <> 100 Sleep(1000) ProgressSet( $i, $i & " percent", $sMainText) $i+=1 Wend ; You can finish off the progress bar with the following ProgressSet($i, "COMPLETE!", $sMainText) Sleep(2000) ProgressOff() ; Or just use a msgbox which I choose to use instead of the above ProgressOff() msgbox(32 + 262144, "Progress Meter", "Progress Meter Complete!") Edited June 7, 2012 by mechaflash213 Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” 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