Hier ist eine Erweiterung für FF.au3 um den FireFox Download-Manager (nicht das Download-Fenster!) zu kontrollieren:
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
#Region Includes
#include <Array.au3>
#include <_FF_DM.au3>
#EndRegion Includes
If _FFConnect() Then
If _FF_DM_IsDownloading() Then
; IDs of the current downloads
$aIDs = _FF_DM_GetActiveDownloadsIDs()
_ArrayDisplay($aIDs)
If UBound($aIDs) > 1 Then
; Informations about the first download
$aInfo = _FF_DM_GetDownloadInfo($aIDs[1])
_ArrayDisplay($aInfo)
; 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)
; 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
Exit
[/autoit]Bekanntes Problem:
Ist ein Download nicht aktiv wird keine gültige ID geliefert.
Viel Spaß damit!
Grüße
Stilgar