Jump to content

Recommended Posts

Posted

hello

Im creating an app that download several file.i have problem that when start first download and using a loop to monitor ans update status on a list view , somehow script is frozen and not working.

is ther any way to send loops in background and better way to update listview?

; Wait for the download to complete :
    Do
        $currentDown[0][3]=InetGetInfo($hDownload, $INET_DOWNLOADREAD)
        Sleep(250)
        _GUICtrlListView_DeleteAllItems($idListview)
        _GUICtrlListView_AddArray($idListview,$currentDown )

    Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)

 

  • Developers
Posted

No multi-threading is required in this case as the download is performed already in the background, so all that is required is to store the handles of each submitted download in an array, and then loop through this array getting the status for each active download and handle the ended sessions.

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
1 hour ago, Jos said:

No multi-threading is required in this case as the download is performed already in the background, so all that is required is to store the handles of each submitted download in an array, and then loop through this array getting the status for each active download and handle the ended sessions.

 

i already sent the download to background,but the way you mentioned is fine if we just have download progress , but because the download may take time i want to other aspect of gui can work for example user can add more download to list.

Global $hDownload = InetGet($url , @ScriptDir&"\"&$sFileName&$sExtension, BitOR( $INET_IGNORESSL, $INET_BINARYTRANSFER), $INET_DOWNLOADBACKGROUND)

 

  • Developers
Posted
9 minutes ago, rot3r said:

but because the download may take time i want to other aspect of gui can work for example user can add more download to list.

Understand, hence my question for a more complete script so we can assist. ;)

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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