Download script

  • Hallo, habe ein script was nicht geht,
    Hilft mir mal bitte

    Spoiler anzeigen
    [autoit]


    #include <FTPEx.au3>
    #include <Debug.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GuiListView.au3>
    GUICreate("Dings", 220, 250, 100, 200, -1)
    GUISetState(@SW_SHOW)
    $progressbar1 = GUICtrlCreateProgress(10, 10, 200, 20)
    Local $server = '###'
    Local $username = '###'
    Local $pass = '###t'
    Local $Open = _FTP_Open('MyFTP Control')
    Local $Conn = _FTP_Connect($Open, $server, $username, $pass, 0, $INTERNET_DEFAULT_FTP_PORT, $INTERNET_SERVICE_FTP, 0)
    _FTP_ProgressDownload($Conn, "splash.jpg", "/www/splash.jpg", "_UpdateProgress")
    Local $Ftpc = _FTP_Close($Open)
    Func _UpdateProgress($percent)
    GUICtrlSetData($progressbar1, $percent)
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Return -1 ; _FTP_DownloadProgress Aborts with -1, so you can exit you app afterwards
    EndSwitch
    Return 1 ; Otherwise contine Download
    EndFunc ;==>_UpdateProgress

    [/autoit]

    Einmal editiert, zuletzt von igotti (5. Januar 2014 um 13:30)

  • Zitat

    Hallo, habe ein script was nicht geht,

    Nicht sehr aussagekräftig.
    Wie wäre es mit einer genaueren Fehlerbeschreibung? Und schon ordentlich selber debuggt?
    Siehe hier.

    //Edit: Einfach von hier kopiert, was? Naja ...

    There's a joke that C has the speed and efficieny of assembly language combined with readability of....assembly language. In other words, it's just a glorified assembly language. - Teh Interwebz

    C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, you blow off your whole leg. - Bjarne Stroustrup
    Genie zu sein, bedeutet für mich, alles zu tun, was ich will. - Klaus Kinski

    Einmal editiert, zuletzt von PainTain (4. Januar 2014 um 21:41)

  • Oh, jetzt geht es O.o


    Dann setze den Thread-Präfix bitte auf "gelöst" (1. Post bearbeiten).

    There's a joke that C has the speed and efficieny of assembly language combined with readability of....assembly language. In other words, it's just a glorified assembly language. - Teh Interwebz

    C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, you blow off your whole leg. - Bjarne Stroustrup
    Genie zu sein, bedeutet für mich, alles zu tun, was ich will. - Klaus Kinski