ISDBApplicationEvents::OnDownloadFinished: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(updated param list in MethodDeclaration) |
||
Line 1: | Line 1: | ||
{{MethodDeclaration|SDBApplication|ISDBApplicationEvents|Sub OnDownloadFinished(URL | {{MethodDeclaration|SDBApplication|ISDBApplicationEvents|Sub OnDownloadFinished(URL as String, Success as Boolean, ResponseCode as Long)}} | ||
===Parameters=== | ===Parameters=== |
Revision as of 14:27, 20 July 2011
CoClass SDBApplication, Interface ISDBApplicationEvents
Sub OnDownloadFinished(URL as String, Success as Boolean, ResponseCode as Long)
Parameters
Name | Type | Description |
---|---|---|
URL | String | URL of file that has been just downloaded |
Success | Boolean | Download was successful (true), Download has failed (false) |
ResponseCode | Long | Returns -1 if user has cancelled the download otherwise returns HTTP status code (200 if OK, see http://www.iana.org/assignments/http-status-codes for complete list) |
Event description
Is called whenever a file download finishes.
Note: This event takes effect from MediaMonkey 4.0 and higher!
Example code
Sub OnStartUp()
Script.RegisterEvent SDB, "OnDownloadFinished", "SDBDownloadFinished"
End Sub
Sub SDBDownloadFinished( URL, Success, ResponseCode)
if Success then
MsgBox("Download has finished successfuly for the URL:"&URL)
else
MsgBox("Download has failed for the URL:"&URL&", ResponseCode = "&ResponseCode)
end if
End Sub