# Function Reference

# ProgressOn

Creates a customizable progress bar window.

ProgressOn ( "title", "maintext" [, "subtext" [, x pos [, y pos [, opt]]]] )

## Parameters

title | Title for progress window.
maintext | Text for Main, Bold, Upper label.
subtext | [optional] text for Sub, Normal, Lower label. (default is blank)
x pos | [optional] position from left (in pixels) of progress window. (default is centered)
y pos | [optional] position from top (in pixels) of progress window. (default is centered)
opt | [optional] Default is 'always on top/with title/not moveable' Add up the following options you want: $DLG_NOTITLE (1) = borderless, titleless window $DLG_NOTONTOP (2) = Without "always on top" attribute $DLG_MOVEABLE (16) = Window can be moved Constants are defined in AutoItConstants.au3

## Return Value

None.

## Remarks

To skip an optional parameter, leaving its default value intact, use:
"" for string parameters
-1 for numeric parameters
If ProgressOn() is called while a progress window already exists, the window is redrawn/moved. (If you want multiple simultaneous progress windows, you need to use multiple scripts.)
If you want to use a maintext of 2 lines set by ProgressSet(), you need to define the progress window with 2 lines too.
More than 2 lines leeds to garbage display.

## Related

ProgressOff, ProgressSet

## Example

    #include <AutoItConstants.au3>

    Example()

    Func Example()
        ; Display a progress bar window (maintext with 2 lines).
        ProgressOn("Progress Meter", "Increments every second" & @CRLF & "...", "0%", -1, -1, BitOR($DLG_NOTONTOP, $DLG_MOVEABLE))

        ; Update the progress value of the progress bar window every second.
        For $i = 10 To 100 Step 10
            Sleep(1000)
            ProgressSet($i, $i & "%")
        Next

        ; Set the "subtext" and "maintext" of the progress bar window.
        ProgressSet(100, "Done", "Complete")
        Sleep(5000)

        ; Close the progress window.
        ProgressOff()
    EndFunc   ;==>Example