Jump to content
Sign in to follow this  

Progress Bar Dialog Help

Recommended Posts


I have an auto updater that I need help with. I have figured out how to get the download to work but cannot get the dialog with the progress to work correctly.

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <Array.au3>
#include <File.au3>

If FileExists(@TempDir&"\version.ini") Then

    $onlinever=IniRead(@TempDir & "\version.ini","Version","Version","unknown")
    $20changes=IniRead(@TempDir & "\version.ini","Update","2.0","unknown")
if $onlinever>$currentver then
        $getnew=msgbox(4,"Update Available","Version "&$onlinever&" is available online, you currently have version "&$currentver&".  Would you like to download the latest version now?"&@CRLF&@CRLF&"Note - This is a USB update only not an image update!"&@crlf&"(the download is "&round(($dlsize/1000000),2)&"MB)"&@CRLF&@CRLF&$20changes)
if $getnew=6 Then
            $wheretosave=FileSelectFolder("Please choose a folder to save the updater","",1)
InetGet($updatefile, $wheretosave&"\usbupdate.exe",1)
Until InetGetInfo($hDownload, 2)    ; Check if the download is complete.
Local $aData = InetGetInfo($hDownload, 0)   ; Get all information.
InetClose($hDownload)   ; Close the handle to release resources.
MsgBox(0, "", "Bytes read: " & $aData[0] & @CRLF & _
    "Size: " & $aData[1] & @CRLF & _
    "Complete?: " & $aData[2] & @CRLF & _
    "Successful?: " & $aData[3] & @CRLF & _
    "@error: " & $aData[4] & @CRLF & _
    "@extended: " & $aData[5] & @CRLF)
            msgbox(0,"Done","Finished downloading the new version. This installer will now exit. Please reboot for changes to apply")

Share this post

Link to post
Share on other sites

Nevermind I figured it out. I was unaware that the popup occurs after the download completes.

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