UDF zur Kontrolle des Download Managers

  • Hier ist eine Erweiterung für FF.au3 um den FireFox Download-Manager (nicht das Download-Fenster!) zu kontrollieren:

    _FF_DM.au3

    Benötigt wird dafür die FF.au3 > V0.5.1

    Aktuelle Funktionen:

    • _FF_DM_CleanUp
    • _FF_DM_DownloadPause
    • _FF_DM_DownloadRemove
    • _FF_DM_DownloadResume
    • _FF_DM_DownloadCancel
    • _FF_DM_DownloadRetry
    • _FF_DM_GetActiveDownloadsIDs
    • _FF_DM_GetActiveDownloadsCount
    • _FF_DM_GetDownloadInfo
    • _FF_DM_GetDownloadState
    • _FF_DM_IsDownloading

    Beispiel:

    Spoiler anzeigen
    [autoit]

    #Region Includes
    #include <Array.au3>
    #include <_FF_DM.au3>
    #EndRegion Includes

    [/autoit] [autoit][/autoit] [autoit]

    If _FFConnect() Then
    If _FF_DM_IsDownloading() Then
    ; IDs of the current downloads
    $aIDs = _FF_DM_GetActiveDownloadsIDs()
    _ArrayDisplay($aIDs)

    [/autoit] [autoit][/autoit] [autoit]

    If UBound($aIDs) > 1 Then
    ; Informations about the first download
    $aInfo = _FF_DM_GetDownloadInfo($aIDs[1])
    _ArrayDisplay($aInfo)

    [/autoit] [autoit][/autoit] [autoit]

    ; Pausing the first download
    _FF_DM_DownloadPause($aIDs[1])
    If _FF_DM_GetDownloadState($aIDs[1]) = 4 Then MsgBox(64,"Download paused:",$aInfo[6])
    sleep(5000)

    [/autoit] [autoit][/autoit] [autoit]

    ; Resume the first download
    _FF_DM_DownloadResume($aIDs[1])
    If _FF_DM_GetDownloadState($aIDs[1]) = 0 Then MsgBox(64,"Download is active:",$aInfo[6])
    EndIf
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Exit

    [/autoit]

    Bekanntes Problem:
    Ist ein Download nicht aktiv wird keine gültige ID geliefert.

    Viel Spaß damit!
    Grüße
    Stilgar