Sign in to follow this  
Followers 0
guinness

_ProgressSetMarquee() - Starts/Stops the $PBS_MARQUEE style on a ProgressBar.

22 posts in this topic

#1 ·  Posted (edited)

I always see questions around the Forum about how to create a ProgressBar that shows at least something is happening, despite having no way of counting (see Traditional Example.) This is where _ProgressSetMarquee() is brilliant, because it creates the Marquee style (see Image) without all the fuss of knowing about _SendMessage() etc.. Try the Example below.

Example:

Posted Image

See post #7 for a short but simple example.

or continue for those interested in API calling ...

WARNING: The code below is old, outdated and poorly scripted, therefore caution should be used when viewing this code!

Traditional Example:

 

_Main()

Func _Main()
    GUICreate("Standard use of a ProgressBar()", 240, 50, -1, -1)
    Local $Progress = GUICtrlCreateProgress(10, 10, 220, 20)
    GUISetState(@SW_SHOW)

    For $A = 1 To 100
        GUICtrlSetData($Progress, $A)
        Sleep(50)
        If GUIGetMsg() = -3 Then ExitLoop
    Next

    While 1
        Switch GUIGetMsg()
            Case -3
                Exit
        EndSwitch
    WEnd
EndFunc   ;==>_Main

Function:

 

; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
; #FUNCTION# =========================================================================================================
; Name...........: _ProgressSetMarquee
; Description ...: Starts/Stops the $PBS_MARQUEE effect on a GUICtrlCreateProgress() control.
; Syntax.........: _ProgressSetMarquee($iControl, $hHandle)
; Parameters ....: $iControl - A valid ProgressBar control ID.
;                  $hHandle - A valid GUI handle the ProgressBar is linked with.
; Requirement(s).: v3.3.0.0 or higher
; Return values .: Success - Returns a 2D Array with control ID and state of the ProgressBar. 0 = No Marquee effect Or 1 = Marquee effect.
; Author ........: guinness.
; Example........; Yes
;=====================================================================================================================
Func _ProgressSetMarquee($iControl, $hHandle)
    Local $bType = 0, $iColor = -1, $iIndex = -1
    If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]]

    For $A = 1 To $Global_ProgressSetMarquee[0][0]
        If @error Then ExitLoop
        If $Global_ProgressSetMarquee[$A][0] = $iControl Then
            $iIndex = $A
            $bType = $Global_ProgressSetMarquee[$iIndex][1]
            ExitLoop
        EndIf
    Next

    If $iIndex = -1 Then
        If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]]
        $Global_ProgressSetMarquee[0][0] += 1
        $iIndex = $Global_ProgressSetMarquee[0][0]
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = $bType
        $Global_ProgressSetMarquee[$iIndex][2] = $iColor
    EndIf

    Local $hControl = GUICtrlGetHandle($Global_ProgressSetMarquee[$iIndex][0]), $aControlGetPos = ControlGetPos($hHandle, "", $Global_ProgressSetMarquee[$iIndex][0])
    Local $aStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFF0)
    Local $aExStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFEC)
    If $aStyle[0] <> 1342308360 Then
        GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0])
        $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008
        $hControl = GUICtrlGetHandle($iControl)
        If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then
            DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0)
            GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
        EndIf
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
    EndIf

    Switch $Global_ProgressSetMarquee[$iIndex][1]
        Case 1
            $bType = False
        Case Else
            $bType = True
    EndSwitch

    DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hControl, "uint", 1034, "wparam", $bType, "lparam", 50)
    If @error Then $Global_ProgressSetMarquee[$iIndex][1] = 1
    If $Global_ProgressSetMarquee[$iIndex][1] = 1 Then
        GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0])
        $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008
        If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then
            DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iControl), "wstr", 0, "wstr", 0)
            GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
        EndIf
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = 0
        Return 0
    EndIf
    $Global_ProgressSetMarquee[$iIndex][1] = 1
    Return 1
EndFunc   ;==>_ProgressSetMarquee

; #FUNCTION# =========================================================================================================
; Name...........: _ProgressSetTheme
; Description ...: Sets a 'themed' ProgressBar with the ability to change the color of the ProgressBar.
; Syntax.........: _ProgressSetTheme([$iControl, [$bThemeColor]])
; Parameters ....: $iControl - [optional] A valid ProgressBar control ID. Default = -1 (last control ID)
;                  $hHandle - [optional] A valid Hex color value. Default = 0x24D245
; Requirement(s).: v3.3.0.0 or higher
; Return values .: Success - Returns a value from the 'SetWindowTheme' DLL call.
;                  Failure - Returns 0 with @extended set as 1.
; Author ........: guinness.
; Example........; Yes
;=====================================================================================================================
Func _ProgressSetTheme($iControl = -1, $bThemeColor = 0x24D245)
    Local $bType = 0, $iColor = $bThemeColor, $iIndex = -1, $hControl = GUICtrlGetHandle($iControl)
    If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]]

    $iControl = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hControl)
    If @error Then Return SetError(1, 1, 0)
    $iControl = $iControl[0]

    For $A = 1 To $Global_ProgressSetMarquee[0][0]
        If @error Then ExitLoop
        If $Global_ProgressSetMarquee[$A][0] = $iControl Then
            If $Global_ProgressSetMarquee[$A][1] = 1 Then Return SetError(1, 1, 0) ; Marquee is already running.
            $iIndex = $A
            $bType = $Global_ProgressSetMarquee[$iIndex][1]
            ExitLoop
        EndIf
    Next

    If $iIndex = -1 Then
        If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]]
        $Global_ProgressSetMarquee[0][0] += 1
        $iIndex = $Global_ProgressSetMarquee[0][0]
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = $bType
        $Global_ProgressSetMarquee[$iIndex][2] = $iColor
    EndIf

    Local $aReturn = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0)
    If @error Then Return SetError(1, 1, 0)
    GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
    Return $aReturn[0]
EndFunc   ;==>_ProgressSetTheme

Example use of Function:

 

#include <GUIConstantsEx.au3>

_Main()

Func _Main()
    Local $GUI, $Progress_1, $Progress_2, $Button_1, $Button_2, $Button_3, $Return, $Read

    $GUI = GUICreate("_ProgressSetMarquee()", 240, 90, -1, -1)
    $Progress_1 = GUICtrlCreateProgress(10, 10, 220, 20, 0x0008) ; 0x0008 = $PBS_MARQUEE From <ProgressConstants.au3>
    $Progress_2 = GUICtrlCreateProgress(10, 35, 220, 20, 0x0008) ; 0x0008 = $PBS_MARQUEE From <ProgressConstants.au3>
    $Button_1 = GUICtrlCreateButton("&Top", 10, 60, 70, 25)
    $Button_2 = GUICtrlCreateButton("&Bottom", 85, 60, 70, 25)
    $Button_3 = GUICtrlCreateButton("&All", 160, 60, 70, 25)
    GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case -3
                Exit

            Case $Button_1
                For $A = $Button_1 To $Button_3
                    If $A = $Button_1 Then ContinueLoop
                    GUICtrlSetState($A, $GUI_DISABLE)
                Next
                $Return = _ProgressSetMarquee($Progress_1, $GUI)
                If $Return Then
                    $Read = GUICtrlRead($Button_1)
                    GUICtrlSetData($Button_1, "&Stop")
                Else
                    GUICtrlSetData($Button_1, $Read)
                    For $A = $Button_2 To $Button_3
                        GUICtrlSetState($A, $GUI_ENABLE)
                    Next
                EndIf

            Case $Button_2
                For $A = $Button_1 To $Button_3
                    If $A = $Button_2 Then ContinueLoop
                    GUICtrlSetState($A, $GUI_DISABLE)
                Next
                $Return = _ProgressSetMarquee($Progress_2, $GUI)
                If $Return Then
                    $Read = GUICtrlRead($Button_2)
                    GUICtrlSetData($Button_2, "&Stop")
                Else
                    GUICtrlSetData($Button_2, $Read)
                    For $A = $Button_1 To $Button_3
                        If $A = $Button_2 Then ContinueLoop
                        GUICtrlSetState($A, $GUI_ENABLE)
                    Next
                EndIf

            Case $Button_3
                For $A = $Button_1 To $Button_3
                    If $A = $Button_3 Then ContinueLoop
                    GUICtrlSetState($A, $GUI_DISABLE)
                Next
                For $A = $Progress_1 To $Progress_2
                    $Return = _ProgressSetMarquee($A, $GUI)
                Next
                If $Return Then
                    $Read = GUICtrlRead($Button_3)
                    GUICtrlSetData($Button_3, "&Stop")
                Else
                    GUICtrlSetData($Button_3, $Read)
                    For $A = $Button_1 To $Button_3
                        If $A = $Button_3 Then ContinueLoop
                        GUICtrlSetState($A, $GUI_ENABLE)
                    Next
                EndIf

        EndSwitch
    WEnd
EndFunc   ;==>_Main

; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
; #FUNCTION# =========================================================================================================
; Name...........: _ProgressSetMarquee
; Description ...: Starts/Stops the $PBS_MARQUEE effect on a GUICtrlCreateProgress() control.
; Syntax.........: _ProgressSetMarquee($iControl, $hHandle)
; Parameters ....: $iControl - A valid ProgressBar control ID.
;                  $hHandle - A valid GUI handle the ProgressBar is linked with.
; Requirement(s).: v3.3.0.0 or higher
; Return values .: Success - Returns a 2D Array with control ID and state of the ProgressBar. 0 = No Marquee effect Or 1 = Marquee effect.
; Author ........: guinness.
; Example........; Yes
;=====================================================================================================================
Func _ProgressSetMarquee($iControl, $hHandle)
    Local $bType = 0, $iColor = -1, $iIndex = -1
    If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]]

    For $A = 1 To $Global_ProgressSetMarquee[0][0]
        If @error Then ExitLoop
        If $Global_ProgressSetMarquee[$A][0] = $iControl Then
            $iIndex = $A
            $bType = $Global_ProgressSetMarquee[$iIndex][1]
            ExitLoop
        EndIf
    Next

    If $iIndex = -1 Then
        If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]]
        $Global_ProgressSetMarquee[0][0] += 1
        $iIndex = $Global_ProgressSetMarquee[0][0]
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = $bType
        $Global_ProgressSetMarquee[$iIndex][2] = $iColor
    EndIf

    Local $hControl = GUICtrlGetHandle($Global_ProgressSetMarquee[$iIndex][0]), $aControlGetPos = ControlGetPos($hHandle, "", $Global_ProgressSetMarquee[$iIndex][0])
    Local $aStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFF0)
    Local $aExStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFEC)
    If $aStyle[0] <> 1342308360 Then
        GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0])
        $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008
        $hControl = GUICtrlGetHandle($iControl)
        If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then
            DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0)
            GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
        EndIf
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
    EndIf

    Switch $Global_ProgressSetMarquee[$iIndex][1]
        Case 1
            $bType = False
        Case Else
            $bType = True
    EndSwitch

    DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hControl, "uint", 1034, "wparam", $bType, "lparam", 50)
    If @error Then $Global_ProgressSetMarquee[$iIndex][1] = 1
    If $Global_ProgressSetMarquee[$iIndex][1] = 1 Then
        GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0])
        $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008
        If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then
            DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iControl), "wstr", 0, "wstr", 0)
            GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
        EndIf
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = 0
        Return 0
    EndIf
    $Global_ProgressSetMarquee[$iIndex][1] = 1
    Return 1
EndFunc   ;==>_ProgressSetMarquee

; #FUNCTION# =========================================================================================================
; Name...........: _ProgressSetTheme
; Description ...: Sets a 'themed' ProgressBar with the ability to change the color of the ProgressBar.
; Syntax.........: _ProgressSetTheme([$iControl, [$bThemeColor]])
; Parameters ....: $iControl - [optional] A valid ProgressBar control ID. Default = -1 (last control ID)
;                  $hHandle - [optional] A valid Hex color value. Default = 0x24D245
; Requirement(s).: v3.3.0.0 or higher
; Return values .: Success - Returns a value from the 'SetWindowTheme' DLL call.
;                  Failure - Returns 0 with @extended set as 1.
; Author ........: guinness.
; Example........; Yes
;=====================================================================================================================
Func _ProgressSetTheme($iControl = -1, $bThemeColor = 0x24D245)
    Local $bType = 0, $iColor = $bThemeColor, $iIndex = -1, $hControl = GUICtrlGetHandle($iControl)
    If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]]

    $iControl = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hControl)
    If @error Then Return SetError(1, 1, 0)
    $iControl = $iControl[0]

    For $A = 1 To $Global_ProgressSetMarquee[0][0]
        If @error Then ExitLoop
        If $Global_ProgressSetMarquee[$A][0] = $iControl Then
            If $Global_ProgressSetMarquee[$A][1] = 1 Then Return SetError(1, 1, 0) ; Marquee is already running.
            $iIndex = $A
            $bType = $Global_ProgressSetMarquee[$iIndex][1]
            ExitLoop
        EndIf
    Next

    If $iIndex = -1 Then
        If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]]
        $Global_ProgressSetMarquee[0][0] += 1
        $iIndex = $Global_ProgressSetMarquee[0][0]
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = $bType
        $Global_ProgressSetMarquee[$iIndex][2] = $iColor
    EndIf

    Local $aReturn = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0)
    If @error Then Return SetError(1, 1, 0)
    GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
    Return $aReturn[0]
EndFunc   ;==>_ProgressSetTheme

Example use of Function with inc. theming:

 

#include <GUIConstantsEx.au3>

_Main()

Func _Main()
    Local $GUI, $Progress_1, $Button_1, $Return, $Read

    $GUI = GUICreate("_ProgressSetMarquee()", 240, 90, -1, -1)
    $Progress_1 = GUICtrlCreateProgress(10, 10, 220, 20, 0x0008) ; 0x0008 = $PBS_MARQUEE From <ProgressConstants.au3>
    _ProgressSetTheme() ; <<<<< Set the Theme to the last control ID with Default values.

    $Button_1 = GUICtrlCreateButton("&Start", 85, 60, 70, 25)
    GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case -3
                Exit

            Case $Button_1
                $Return = _ProgressSetMarquee($Progress_1, $GUI)
                If $Return Then
                    $Read = GUICtrlRead($Button_1)
                    GUICtrlSetData($Button_1, "&Stop")
                Else
                    GUICtrlSetData($Button_1, $Read)
                EndIf

        EndSwitch
    WEnd
EndFunc   ;==>_Main

; #FUNCTION# =========================================================================================================
; Name...........: _ProgressSetMarquee
; Description ...: Starts/Stops the $PBS_MARQUEE effect on a GUICtrlCreateProgress() control.
; Syntax.........: _ProgressSetMarquee($iControl, $hHandle)
; Parameters ....: $iControl - A valid ProgressBar control ID.
;                  $hHandle - A valid GUI handle the ProgressBar is linked with.
; Requirement(s).: v3.3.0.0 or higher
; Return values .: Success - Returns a 2D Array with control ID and state of the ProgressBar. 0 = No Marquee effect Or 1 = Marquee effect.
; Author ........: guinness.
; Example........; Yes
;=====================================================================================================================
Func _ProgressSetMarquee($iControl, $hHandle)
    Local $bType = 0, $iColor = -1, $iIndex = -1
    If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]]

    For $A = 1 To $Global_ProgressSetMarquee[0][0]
        If @error Then ExitLoop
        If $Global_ProgressSetMarquee[$A][0] = $iControl Then
            $iIndex = $A
            $bType = $Global_ProgressSetMarquee[$iIndex][1]
            ExitLoop
        EndIf
    Next

    If $iIndex = -1 Then
        If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]]
        $Global_ProgressSetMarquee[0][0] += 1
        $iIndex = $Global_ProgressSetMarquee[0][0]
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = $bType
        $Global_ProgressSetMarquee[$iIndex][2] = $iColor
    EndIf

    Local $hControl = GUICtrlGetHandle($Global_ProgressSetMarquee[$iIndex][0]), $aControlGetPos = ControlGetPos($hHandle, "", $Global_ProgressSetMarquee[$iIndex][0])
    Local $aStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFF0)
    Local $aExStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFEC)
    If $aStyle[0] <> 1342308360 Then
        GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0])
        $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008
        $hControl = GUICtrlGetHandle($iControl)
        If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then
            DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0)
            GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
        EndIf
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
    EndIf

    Switch $Global_ProgressSetMarquee[$iIndex][1]
        Case 1
            $bType = False
        Case Else
            $bType = True
    EndSwitch

    DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hControl, "uint", 1034, "wparam", $bType, "lparam", 50)
    If @error Then $Global_ProgressSetMarquee[$iIndex][1] = 1
    If $Global_ProgressSetMarquee[$iIndex][1] = 1 Then
        GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0])
        $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008
        If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then
            DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iControl), "wstr", 0, "wstr", 0)
            GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
        EndIf
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = 0
        Return 0
    EndIf
    $Global_ProgressSetMarquee[$iIndex][1] = 1
    Return 1
EndFunc   ;==>_ProgressSetMarquee

; #FUNCTION# =========================================================================================================
; Name...........: _ProgressSetTheme
; Description ...: Sets a 'themed' ProgressBar with the ability to change the color of the ProgressBar.
; Syntax.........: _ProgressSetTheme([$iControl, [$bThemeColor]])
; Parameters ....: $iControl - [optional] A valid ProgressBar control ID. Default = -1 (last control ID)
;                  $hHandle - [optional] A valid Hex color value. Default = 0x24D245
; Requirement(s).: v3.3.0.0 or higher
; Return values .: Success - Returns a value from the 'SetWindowTheme' DLL call.
;                  Failure - Returns 0 with @extended set as 1.
; Author ........: guinness.
; Example........; Yes
;=====================================================================================================================
Func _ProgressSetTheme($iControl = -1, $bThemeColor = 0x24D245)
    Local $bType = 0, $iColor = $bThemeColor, $iIndex = -1, $hControl = GUICtrlGetHandle($iControl)
    If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]]

    $iControl = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hControl)
    If @error Then Return SetError(1, 1, 0)
    $iControl = $iControl[0]

    For $A = 1 To $Global_ProgressSetMarquee[0][0]
        If @error Then ExitLoop
        If $Global_ProgressSetMarquee[$A][0] = $iControl Then
            If $Global_ProgressSetMarquee[$A][1] = 1 Then Return SetError(1, 1, 0) ; Marquee is already running.
            $iIndex = $A
            $bType = $Global_ProgressSetMarquee[$iIndex][1]
            ExitLoop
        EndIf
    Next

    If $iIndex = -1 Then
        If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]]
        $Global_ProgressSetMarquee[0][0] += 1
        $iIndex = $Global_ProgressSetMarquee[0][0]
        $Global_ProgressSetMarquee[$iIndex][0] = $iControl
        $Global_ProgressSetMarquee[$iIndex][1] = $bType
        $Global_ProgressSetMarquee[$iIndex][2] = $iColor
    EndIf

    Local $aReturn = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0)
    If @error Then Return SetError(1, 1, 0)
    GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2])
    Return $aReturn[0]
EndFunc   ;==>_ProgressSetTheme

 

Edited by guinness
1 person likes this

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites



Very Good!

I have always wondered how to do the marquees


ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

---

Edited by playlet

Share this post


Link to post
Share on other sites

Thanks! I forgot to mention that the Style (not ExStyle) of the ProgressBar should be set with 0x0008, but its not a big deal because the Function checks the Style of the ProgressBar and changes accordingly.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites
Update: Added _ProgressSetTheme() and improved _ProgressSetMarquee(). Also added a 2nd Example showing the use of 'theming' the ProgressBar to add a custom color. See OP for more details.

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites
Updated: Slight syntax change with _ProgressSetTheme(), now _ProgressSetMarquee() knows if there is a Theme set to the ProgressBar. See OP for more details.

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

OK, so after all that messing around with API calls, deleting the ProgressBar to Reset the Marquee effect plus more ... all it actually took was just setting the GUICtrlSetStyle() again! :)

I was inspired by >this post to re-evaluate the code and found this little trick with GUICtrlSetStyle()!

I suppose I shouldn't be disappointed at least I learnt from this experience :)

Simple Marquee Progress:

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>

Example()

Func Example()
    Local $hGUI = GUICreate('Marquee ProgressBar', 300, 90)
    Local $iProgressBar = GUICtrlCreateProgress(10, 10, 280, 20, $PBS_MARQUEE) ; Create a progressbar using the marquee style
    Local $iStart = GUICtrlCreateButton('Start', 30, 60, 85, 25)
    Local $iStop = GUICtrlCreateButton('Stop', 120, 60, 85, 25)
    Local $iReset = GUICtrlCreateButton('Stop && Reset', 210, 60, 85, 25)
    GUISetState(@SW_SHOW, $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

            Case $iStart
                _ProgressMarquee_Start($iProgressBar) ; Start the marquee effect

            Case $iStop
                _ProgressMarquee_Stop($iProgressBar) ; Stop the marquee effect

            Case $iReset
                _ProgressMarquee_Stop($iProgressBar, True) ; Stop the marquee effect and reset the progressbar

        EndSwitch
    WEnd

    ; Tidy resources
    GUIDelete($hGUI)
EndFunc   ;==>Example

; #FUNCTION# ====================================================================================================================
; Name ..........: _ProgressMarquee_Start
; Description ...: Start the marquee effect
; Syntax ........: _ProgressMarquee_Start($iControlID)
; Parameters ....: $iControlID          - ControlID of a progressbar using the $PBS_MARQUEE style
; Return values .: Success - True
;                  Failure - False
; Author ........: guinness
; Example .......: Yes
; ===============================================================================================================================
Func _ProgressMarquee_Start($iControlID)
    Return GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, True, 50)
EndFunc   ;==>_ProgressMarquee_Start

; #FUNCTION# ====================================================================================================================
; Name ..........: _ProgressMarquee_Stop
; Description ...: Stop the marquee effect
; Syntax ........: _ProgressMarquee_Stop($iControlID[, $bReset = False])
; Parameters ....: $iControlID          - ControlID of a progressbar using the $PBS_MARQUEE style
;                  $bReset              - [optional] Reset the progressbar, True - Reset or False - Don't reset. Default is False
; Return values .: Success - True
;                  Failure - False
; Author ........: guinness
; Example .......: Yes
; ===============================================================================================================================
Func _ProgressMarquee_Stop($iControlID, $bReset = False)
    Local $bReturn = GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, False, 50)
    If $bReturn And $bReset Then
        GUICtrlSetStyle($iControlID, $PBS_MARQUEE)
    EndIf

    Return $bReturn
EndFunc   ;==>_ProgressMarquee_Stop
Edited by guinness
1 person likes this

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

How can I use this simple script:

_Main()  Func _Main()     GUICreate("Standard use of a ProgressBar()", 240, 50, -1, -1)     Local $Progress = GUICtrlCreateProgress(10, 10, 220, 20)     GUISetState(@SW_SHOW)      For $A = 1 To 100         GUICtrlSetData($Progress, $A)         Sleep(50)         If GUIGetMsg() = -3 Then ExitLoop     Next      While 1         Switch GUIGetMsg()             Case -3                 Exit         EndSwitch     WEnd EndFunc   ;==>_Main

in a way that closes it self when the bar reach 100% ?

also is there a way to set it to advance let's say based on how many applications were installed or how many files were copied etc?

Share this post


Link to post
Share on other sites

Maybe you want a standard incremented ProgressBar. Have a look at GUICtrlCreateProgress() in the Help File to get an idea.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Hi all.

I'm trying to use this UDF, but when running my function, the progress bar freezes. See example:

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>

_Main()

Func _Main()
    Local $iProgress_1, $iButton_1, $iButton_2, $iButton_3
    GUICreate("Simple use of a Marquee ProgressBar()", 240, 90, -1, -1)
    $iProgress_1 = GUICtrlCreateProgress(10, 10, 220, 20, $PBS_MARQUEE)
    $iButton_1 = GUICtrlCreateButton("&Start", 10, 60, 70, 25)
    $iButton_2 = GUICtrlCreateButton("S&top", 85, 60, 70, 25)
    $iButton_3 = GUICtrlCreateButton("Stop && &Reset", 160, 60, 70, 25)
    GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                Exit

            Case $iButton_1
                _ProgressMarquee_Start($iProgress_1)
                _CheckPingAddress('ddd.dd')
                ;^^^^^^^^^^^^^^^^^^^^^^^^^

            Case $iButton_2
                _ProgressMarquee_Stop($iProgress_1)

            Case $iButton_3
                _ProgressMarquee_Stop($iProgress_1, 1)

        EndSwitch
    WEnd
EndFunc   ;==>_Main

; -------------------------------
Func _CheckPingAddress($sAddress)
    Local $sResult
    ConsoleWrite('>ping ' & $sAddress & '...' & @CRLF)
    $sResult = Ping( $sAddress)
    If $sResult Then
        ConsoleWrite('result: ' & $sResult & 'ms' & @CRLF)
        Return True
    Else
        ConsoleWrite('result: failure' & @CRLF)
        Return False
    EndIf
EndFunc   ;==>__CheckPingDNSAddress
;--------------------------------


Func _ProgressMarquee_Start($iControlID = -1)
    Local Const $PBM_SETMARQUEE = 1034
    Return GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, 1, 50)
EndFunc   ;==>_ProgressMarquee_Start

Func _ProgressMarquee_Stop($iControlID = -1, $iReset = 0)
    Local Const $PBS_MARQUEE = 0x0008, $PBM_SETMARQUEE = 1034
    GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, 0, 50)
    If $iReset = 1 Then
        Return GUICtrlSetStyle($iControlID, $PBS_MARQUEE)
    EndIf
    Return 1
EndFunc   ;==>_ProgressMarquee_Stop

Any suggestions how to display progress bar during the execution of my functions are welcome

Share this post


Link to post
Share on other sites

I tested on Windows 7 x64 & AutoIt (Latest beta) without any problem.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

I use Windows 7 x64. AutoIt (x86)

Just installed AutoIt v3.3.7.14 (beta)

Doesn't work ...

Progress bar is showing only after function _CheckPingAddress('ddd.dd') has finished...

Share this post


Link to post
Share on other sites

Weird, because when I select 'Start' the Marquee Progress starts and then your Function executes afterwards. I even added Sleep(6000) at the start of your Function and the Marquee still started.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

What about this >>

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>

_Main()

Func _Main()
    Local $iProgress_1, $iButton_1, $iButton_2, $iButton_3
    GUICreate("Simple use of a Marquee ProgressBar()", 240, 90, -1, -1)
    $iProgress_1 = GUICtrlCreateProgress(10, 10, 220, 20, $PBS_MARQUEE)
    $iButton_1 = GUICtrlCreateButton("&Start", 10, 60, 70, 25)
    $iButton_2 = GUICtrlCreateButton("S&top", 85, 60, 70, 25)
    $iButton_3 = GUICtrlCreateButton("Stop && &Reset", 160, 60, 70, 25)
    GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                Exit

            Case $iButton_1
                _ProgressMarquee_Start($iProgress_1)
                _Example()

            Case $iButton_2
                _ProgressMarquee_Stop($iProgress_1)

            Case $iButton_3
                _ProgressMarquee_Stop($iProgress_1, 1)

        EndSwitch
    WEnd
EndFunc   ;==>_Main

Func _Example()
    Sleep(4000)
    MsgBox(64, "Example", "Example")
EndFunc

Func _ProgressMarquee_Start($iControlID = -1)
    Local Const $PBM_SETMARQUEE = 1034
    Return GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, 1, 50)
EndFunc   ;==>_ProgressMarquee_Start

Func _ProgressMarquee_Stop($iControlID = -1, $iReset = 0)
    Local Const $PBS_MARQUEE = 0x0008, $PBM_SETMARQUEE = 1034
    GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, 0, 50)
    If $iReset = 1 Then
        Return GUICtrlSetStyle($iControlID, $PBS_MARQUEE)
    EndIf
    Return 1
EndFunc   ;==>_ProgressMarquee_Stop

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

That example works.

Problem is in ping() in my case.

Any idea?

Edited by raymanr

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Change the timeout in Ping as now it's 4 seconds, perhaps 400ms would be better.

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

I've changed timeout to 400, now progress bar starting erlier, but also only after ping()...

In my script i have many times using ping(), and the progress bar always freezes when they run. :mellow:

Share this post


Link to post
Share on other sites

I'm seeing the same issue, but the problem isn't with the Progressbar, it's with the way Ping is working. I believe that the problem is caused because Ping is using too much of the CPU or other resources which is basically freezing the script and/or the progress bar updates. I've run into this problem when using FileCopy as well, where the computer can't do both, updating my progress bar and copying a large file or folder, at the same time.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Weird how I'm not seeing the problem though. Thanks for verifying BrewManNH.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Note: This UDF is deprecated as of 09/10/2012. Any questions regarding support for this UDF will not be given and users should look to using this instead of the UDF.

Thanks to all who helped me with the UDF.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


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
Sign in to follow this  
Followers 0