Sign in to follow this  
Followers 0

Need help about GUI event handling

3 posts in this topic

#1 ·  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.


inetGet("", "c:/", 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")



;----------------------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")



If $msg = $GUI_EVENT_CLOSE Then ExitLoop


Edited by MarioX

Share this post

Link to post
Share on other sites

Thanks Valuater for the interesting link, lot's of useful thing to learn.


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