Jump to content

How to count loops and show to gui?

Recommended Posts

quick poor example:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
; 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
    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
EndFunc   ;==>Example1

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to post
Share on other sites

$i = 1

While 1 ;creates an infinite loop
  $i += 1

Edited 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 post
Share on other sites

$sMainText = "Increments every second"
ProgressOn("Progress Meter", $sMainText, "0 percent")
$i = 0
While $i <> 100
  ProgressSet( $i, $i & " percent", $sMainText)
; You can finish off the progress bar with the following
ProgressSet($i, "COMPLETE!", $sMainText)
; Or just use a msgbox which I choose to use instead of the above
msgbox(32 + 262144, "Progress Meter", "Progress Meter Complete!")

Edited by mechaflash213

“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 post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...