Jump to content

Recommended Posts

Posted (edited)

I'm a AutoIt beginner user and I'm looking for assistance to better understand the following.

I've a GUI with a progress bar called $progress_1 and a label named $Label_1

The program download a file showing a progress bar and a little status label.

Now I need to download a second file, I want that after finished the first file download, a message will be showed for two second in the status label and then the second file download start using the same progress bar.

How to do this ?

Here follow the code section that handle the GUI.

Thanking in advance for any advice.

Mario

inetGet("http://www.website.com/file1.zip", "c:/file1.zip", 1, 1)

;----------------------Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

;----------------------Download progress bar updater

While @InetGetActive

$currentsspercent = @InetGetBytesRead / $var3 * 100

GUICtrlSetData ($Progress_1, $currentsspercent)

GUICtrlSetData ($Label_1, "download in progress")

Sleep(250)

wend

;----------------------After download a message is notified and a sound is played then after 3" pause the program quit

GUICtrlSetData ($Label_1, "download done")

SoundPlay("C:\Windows\media\Windows XP Notify.wav")

Sleep(3000)

Exit

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

Edited by MarioX

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...