Jump to content

_FTP_ProgressDownload sloooowwww.....


Recommended Posts

Just started with AutoIT (and programming, really) 3 days ago, so bear with me ^_^

I'm using _FTP_ProgressDownload to update a progressbar on a GUI, but the download is SOO MUCH slower than using _FTP_FileGet (10x? at least).

_FTP_ProgressDownload ($iConn, $tempDownloadDir & $Filename, $Filename, UpdateGUIProgressBar)

Func UpdateGUIProgressBar($iPercent)
    GUICtrlSetData($FTP_GUI_Status, $iPercent)
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit -1 ; _FTP_DownloadProgress Aborts with -1, so you can exit your app afterwards
        Case $btn_FTP_GUI_Exit
            Exit -2 ; Just Cancel, without special Return value
    EndSwitch
    Return 1 ; Otherwise continue Download
EndFunc

vs

If _FTP_FileGet ($iConn, $Filename, $tempDownloadDir & $Filename)

... but that does not give me a progress bar or the ability to cancel the download.

Any thoughts or pointers to snippets?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...