Multidownloader

  • Ich habe mal ein Programm gemacht was Dateien aus dem Internet downloadet, dabei kann man bis zu 3 Dateien gleichzeitig downloaden. Zusätzlich bietet mein Programm auch die Möglichkeit Videos direkt von YouTube, Myvideo und Sevenload (hoffe es kommen noch mehr xD) zu saugen. :) Würde mich über Lob, Kritik und Bugreport freuen.

    - Das Programm funktioniert bloß im kompilierten Zustand
    - mein _inetgetsource() funzt irgendwie nicht deswegen ist da ein Alternativfunktion drin

    Wenn jemand noch n Source für andere Videoplatformen hat wäre das cool =)

    MfG xXlowXx

    autoit.de/wcf/attachment/6653/

    Spoiler anzeigen
    [autoit]


    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.3.0.0
    Author: xXlowXx

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

    Script Function:
    Ein Downloadtool was bis zu 3 Downloads gleichzeitigt macht.
    Besonderheit: Downloadet Videos von YouTube, Myvideo und Sevenload
    #ce ----------------------------------------------------------------------------

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

    #Region
    #AutoIt3Wrapper_icon=..\..\..\Programme\AutoIt3\Icons\au3.ico
    #AutoIt3Wrapper_outfile=..\Desktop\Multidownloader.exe
    #AutoIt3Wrapper_Compression=4
    #EndRegion

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

    Opt("TrayIconHide",1)
    Opt("OnExitFunc", "OnAutoItExit")
    Opt("WinTitleMatchMode", 3)
    Opt("TrayMenuMode",1)
    $Read = IniRead(@TempDir & "\a.ini", "a", "a", "")
    If $Read = "" Then
    FileDelete(@TempDir & "\fertig.ini")
    Opt("TrayIconHide",0)
    Else
    FileDelete(@TempDir & "\a.ini")
    Download()
    EndIf
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListview.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <String.au3>
    $Form1_1 = GUICreate("Multidownloader", 850, 402, -1, -1)
    $List1 = GUICtrlCreateListView("", 8, 48, 833, 240)
    _GUICtrlListView_AddColumn($List1, "Link", 390)
    _GUICtrlListView_AddColumn($List1, "Status", 140)
    _GUICtrlListView_AddColumn($List1, "Dateiname", 280)
    $Button1 = GUICtrlCreateButton("Hinzufügen", 208, 8, 89, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Button2 = GUICtrlCreateButton("Löschen", 304, 8, 81, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Button3 = GUICtrlCreateButton("Download", 392, 8, 81, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Button4 = GUICtrlCreateButton("Abbrechen", 480, 8, 81, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Button5 = GUICtrlCreateButton("Beenden", 568, 8, 81, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Group1 = GUICtrlCreateGroup("Download 1", 8, 296, 241, 97)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Label1 = GUICtrlCreateLabel("Downloadstatus:", 16, 320, 222, 20)
    $Label2 = GUICtrlCreateLabel("Geschwindigkeit:", 16, 344, 223, 20)
    $Label3 = GUICtrlCreateLabel("verbleibende Zeit:", 16, 368, 224, 20)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Download 2", 304, 296, 241, 97)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Label4 = GUICtrlCreateLabel("Downloadstatus:", 312, 320, 222, 20)
    $Label5 = GUICtrlCreateLabel("Geschwindigkeit:", 312, 344, 223, 20)
    $Label6 = GUICtrlCreateLabel("verbleibende Zeit:", 312, 368, 224, 20)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group3 = GUICtrlCreateGroup("Download 3", 600, 296, 241, 97)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Label7 = GUICtrlCreateLabel("Downloadstatus:", 608, 320, 222, 20)
    $Label8 = GUICtrlCreateLabel("Geschwindigkeit:", 608, 344, 223, 20)
    $Label9 = GUICtrlCreateLabel("verbleibende Zeit:", 608, 368, 224, 20)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Combo1 = GUICtrlCreateCombo("gleichzeitig", 660, 13, 145, 25)
    GUICtrlSetData(-1, "1 Download|2 Downloads|3 Downloads")
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Stop = GUICtrlCreateLabel("", 816, 18, 26, 17)
    $Button6 = GUICtrlCreateButton("Speichern", 8, 8, 89, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Button7 = GUICtrlCreateButton("Öffnen", 104, 8, 89, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    GUISetState(@SW_SHOW)
    Global $Button11, $Button12, $Input1, $Form1, $sCode, $p = 0, $las, $Name
    $f = @HomeDrive & "\Downloads\"
    GUICtrlSetState($Button4, $GUI_DISABLE)

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

    DirCreate(@HomeDrive & "\Downloads")
    Main()

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

    Func Main()
    While 1
    GUI()
    WEnd
    EndFunc ;==>Main

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

    Func GUI()
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $Button1
    $Form1 = GUICreate("Link hinzufügen", 210, 98, -1, -1)
    $Input1 = GUICtrlCreateInput("", 8, 32, 193, 21)
    $Label11 = GUICtrlCreateLabel("Downloadlink:", 8, 8, 84, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "arial")
    $Button11 = GUICtrlCreateButton("OK", 8, 64, 91, 25, $WS_GROUP)
    $Button12 = GUICtrlCreateButton("Abbrechen", 112, 64, 91, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    Do
    Sleep(10)
    $nMsg = GUIGetMsg()
    Until $nMsg = $Button11 Or $nMsg = $Button12
    If $nMsg = $Button11 Then
    Add()
    GUIDelete($Form1)
    Else
    GUIDelete($Form1)
    EndIf
    Case $Button2
    Loeschen()
    Case $Button3
    If GUICtrlRead($Combo1) <> "gleichzeitig" Then
    GUICtrlSetState($Button3, $GUI_DISABLE)
    GUICtrlSetState($Button4, $GUI_ENABLE)
    GUICtrlSetState($Button6, $GUI_DISABLE)
    $c = GUICtrlRead($Combo1)
    Switch $c
    Case "1 Download"
    Start(1)
    Case "2 Downloads"
    Start(2)
    Case "3 Downloads"
    Start(3)
    EndSwitch
    EndIf
    Case $Button4
    GUICtrlSetState($Button6, $GUI_ENABLE)
    Stop()
    Main()
    Case $Button5
    GUICtrlSetData($Stop, "Stop")
    Sleep(3000)
    Exit
    Case $Button6
    Speichern()
    Case $Button7
    Laden()
    EndSwitch
    Sleep(10)
    EndFunc ;==>GUI

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

    Func Speichern()
    $save = FileSaveDialog("Tabelle speichern", $f, "Download-Tabelle (*.dtb)")
    If Not @error Then
    For $i = 0 To _GUICtrlListView_GetItemCount($List1) - 1
    FileWrite($save & ".dtb", _GUICtrlListView_GetItemText($List1, $i) & "|" & _GUICtrlListView_GetItemText($List1, $i, 1) & "|" & _GUICtrlListView_GetItemText($List1, $i, 2) & @CRLF)
    Next
    EndIf
    EndFunc ;==>Speichern

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

    Func Laden()
    $open = FileOpenDialog("Tabelle öffnen", $f, "Download-Tabelle (*.dtb)")
    If Not @error Then
    For $i = 1 To 1000
    $Read = FileReadLine($open, $i)
    If Not @error Then
    $Ex = _StringExplode($Read, "|", 0)
    _GUICtrlListView_AddItem($List1, $Ex[0])
    _GUICtrlListView_SetItemText($List1, _GUICtrlListView_GetItemCount($List1) - 1, $Ex[1], 1)
    _GUICtrlListView_SetItemText($List1, _GUICtrlListView_GetItemCount($List1) - 1, $Ex[2], 2)
    Else
    ExitLoop
    EndIf
    Next
    EndIf
    EndFunc ;==>Laden

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

    Func Start($d)
    $las = $d
    While 1
    GUI()
    If IniRead(@TempDir & "\fertig.ini", "a", "1", "0") = "1" Then
    IniWrite(@TempDir & "\fertig.ini", "a", "1", "0")
    For $i = 0 To _GUICtrlListView_GetItemCount($List1)
    If _GUICtrlListView_GetItemText($List1, $i, 1) = "Download bei Download1" Then
    _GUICtrlListView_SetItemText($List1, $i, "Fertig", 1)
    ExitLoop
    EndIf
    Next
    EndIf

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

    If IniRead(@TempDir & "\fertig.ini", "a", "2", "0") = "1" Then
    IniWrite(@TempDir & "\fertig.ini", "a", "2", "0")
    For $i = 0 To _GUICtrlListView_GetItemCount($List1)
    If _GUICtrlListView_GetItemText($List1, $i, 1) = "Download bei Download2" Then
    _GUICtrlListView_SetItemText($List1, $i, "Fertig", 1)
    ExitLoop
    EndIf
    Next
    EndIf

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

    If IniRead(@TempDir & "\fertig.ini", "a", "3", "0") = "1" Then
    IniWrite(@TempDir & "\fertig.ini", "a", "3", "0")
    For $i = 0 To _GUICtrlListView_GetItemCount($List1)
    If _GUICtrlListView_GetItemText($List1, $i, 1) = "Download bei Download3" Then
    _GUICtrlListView_SetItemText($List1, $i, "Fertig", 1)
    ExitLoop
    EndIf
    Next
    EndIf
    $p = 0
    $len_check = StringLen("Downloadstatus:") + 3
    $len1 = StringLen(GUICtrlRead($Label1))
    $len2 = StringLen(GUICtrlRead($Label4))
    $len3 = StringLen(GUICtrlRead($Label7))
    If $len1 > $len_check Then $p += 1
    If $len2 > $len_check Then $p += 1
    If $len3 > $len_check Then $p += 1
    If $p < $d Then
    For $i = 0 To _GUICtrlListView_GetItemCount($List1) - 1
    $Item = _GUICtrlListView_GetItem($List1, $i, 1)
    If $Item[3] <> "Fertig" Then
    If $Item[3] <> "Download bei Download1" Then
    If $Item[3] <> "Download bei Download2" Then
    If $Item[3] <> "Download bei Download3" Then
    $Item2 = _GUICtrlListView_GetItem($List1, $i)
    Check($Item2[3], $i)
    EndIf
    EndIf
    EndIf
    EndIf
    Next
    EndIf
    WEnd
    EndFunc ;==>Start

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

    Func Stop()
    GUICtrlSetData($Stop, "Stop")
    GUICtrlSetState($Button4, $GUI_DISABLE)
    GUICtrlSetState($Button3, $GUI_ENABLE)
    For $i = 0 To _GUICtrlListView_GetItemCount($List1)
    If _GUICtrlListView_GetItemText($List1, $i, 1) = "Download bei Download1" Then
    _GUICtrlListView_SetItemText($List1, $i, "Abgebrochen", 1)
    ExitLoop
    EndIf
    Next
    For $i = 0 To _GUICtrlListView_GetItemCount($List1)
    If _GUICtrlListView_GetItemText($List1, $i, 1) = "Download bei Download2" Then
    _GUICtrlListView_SetItemText($List1, $i, "Abgebrochen", 1)
    ExitLoop
    EndIf
    Next
    For $i = 0 To _GUICtrlListView_GetItemCount($List1)
    If _GUICtrlListView_GetItemText($List1, $i, 1) = "Download bei Download3" Then
    _GUICtrlListView_SetItemText($List1, $i, "Abgebrochen", 1)
    ExitLoop
    EndIf
    Next
    Sleep(2000)
    GUICtrlSetData($Stop, "")
    EndFunc ;==>Stop

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

    Func Add()
    If GUICtrlRead($Input1) <> "" Then
    If StringInStr(GUICtrlRead($Input1), "youtube.com", 1) Or StringInStr(GUICtrlRead($Input1), "http://www.myvideo.de/watch/", 1) Or StringInStr(GUICtrlRead($Input1), "sevenload.com", 1) Then
    _GUICtrlListView_AddItem($List1, GUICtrlRead($Input1))
    _GUICtrlListView_AddSubItem($List1, _GUICtrlListView_GetItemCount($List1) - 1, "Warte", 1)
    _GUICtrlListView_SetItemText($List1, _GUICtrlListView_GetItemCount($List1) - 1, "Warte", 2)
    Else
    $Name = FileSaveDialog("Dateiname (mit Dateiendung!)", $f, "All (*.*)")
    If Not @error Then
    _GUICtrlListView_AddItem($List1, GUICtrlRead($Input1))
    _GUICtrlListView_AddSubItem($List1, _GUICtrlListView_GetItemCount($List1) - 1, "Warte", 1)
    _GUICtrlListView_AddSubItem($List1, _GUICtrlListView_GetItemCount($List1) - 1, $Name, 2)
    EndIf
    EndIf
    GUIDelete($Form1)
    EndIf
    EndFunc ;==>Add

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

    Func Loeschen()
    For $i = 0 To _GUICtrlListView_GetItemCount($List1)
    If _GUICtrlListView_GetItemSelected($List1, $i) = True Then _GUICtrlListView_DeleteItem(GUICtrlGetHandle($List1), $i)
    Next
    EndFunc ;==>Loeschen

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

    Func Check($l, $index)
    If StringInStr($l, "youtube.com", 1) Then
    _GUICtrlListView_SetItemText($List1, $index, "YouTube-Link", 1)
    You($l, $index)
    EndIf
    If StringInStr($l, "http://www.myvideo.de/watch/", 1) Then
    _GUICtrlListView_SetItemText($List1, $index, "MyVideo-Link", 1)
    myvideo($l, $index)
    EndIf
    If StringInStr($l, "sevenload.com", 1) Then
    _GUICtrlListView_SetItemText($List1, $index, "Sevenload-Link", 1)
    Sevenload($l, $index)
    EndIf
    Dl($l, _GUICtrlListView_GetItemText($List1,$index,2), $index)
    EndFunc ;==>Check

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

    Func You($Dwnlink, $index)
    $sCode = _INetGetSourc($Dwnlink)
    $s_v = StringMid($Dwnlink, StringInStr($Dwnlink, "v=") + 2)
    If StringInStr($s_v, "&", 1) Then $s_v = StringLeft($s_v, StringInStr($s_v, "&", 1) - 1)
    $Token = StringMid($sCode, StringInStr($sCode, '"t": "', 1) + 6, 44)
    $Name = YouTube("http://www.youtube.com/watch?v=" & $s_v)
    $Name = Name($Name)
    $Name = StringRight($Name, StringLen($Name) - 1)
    _GUICtrlListView_SetItemText($List1, $index, $Name, 2)
    Dl("http://youtube.com/get_video?video_id=" & $s_v & "&t=" & $Token & "=&el=detailpage", $f & $Name & ".flv", $index)
    EndFunc ;==>You

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

    Func YouTube($Link_you)
    $Titel_Temp = _StringExplode($sCode, "YouTube", 0)
    $Titel_Temp2 = StringRight($Titel_Temp[1], StringLen($Titel_Temp[1]) - 6)
    $Titel_Temp3 = _StringExplode($Titel_Temp2, @CRLF, 0)
    $Titel_Temp4 = _StringExplode($Titel_Temp3[0], "</t", 0)
    $Titel = StringLeft($Titel_Temp4[0], StringLen($Titel_Temp4[0]) - 2)
    Return $Titel
    EndFunc ;==>YouTube

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

    Func myvideo($Dwnlink, $index)
    $sCode = _INetGetSourc($Dwnlink)
    $Ex = _StringExplode($sCode, "href='", 0)
    $Ex2 = _StringExplode($Ex[1], "_1", 0)
    $Ex3 = _StringExplode($Ex2[0], "thumbs/", 0)
    $Link = $Ex3[0] & $Ex3[1]
    $Ex4 = _StringExplode($sCode, "'subject_id", 0)
    $Ex5 = _StringExplode($Ex4[1], "value='", 0)
    $Ex6 = _StringExplode($Ex5[2], "'", 0)
    $Name = Name($Ex6[0])
    _GUICtrlListView_SetItemText($List1, $index, $Name, 2)
    Dl($Link & ".flv", $f & $Name & ".flv", $index)
    EndFunc ;==>myvideo

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

    Func Sevenload($Dwnlink, $index)
    $sCode = _INetGetSourc($Dwnlink)
    $Ex = _StringExplode($sCode, 'screen', 0)
    $s = StringMid($Ex[13], 61, StringLen($Ex[13]) - 79)
    $s = Shockwave($s)
    $sCode_s = _INetGetSourc($s)
    $Ex2 = _StringExplode($sCode_s, '<location seeking="yes">', 0)
    $Ex3 = _StringExplode($Ex2[1], '<', 0)
    $Ex4 = _StringExplode($sCode, '/>', 0)
    $Ex5 = _StringExplode($Ex4[5], 'Video - sevenload', 0)
    $Ex6 = _StringExplode($Ex5[0], '>', 0)
    $Name = Name($Ex6[1])
    _GUICtrlListView_SetItemText($List1, $index, $Name, 2)
    Dl($Ex3[0], $f & $Name & ".flv", $index)
    EndFunc ;==>Sevenload

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

    Func _INetGetSourc($s_URL)
    $WinHttpReq = ObjCreate("WinHttp.WinHttpRequest.5.1")
    $WinHttpReq.Open("GET", $s_URL, False)
    $WinHttpReq.Send()
    Return $WinHttpReq.ResponseText
    EndFunc ;==>_INetGetSourc

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

    Func Name($Text)
    $Text = StringReplace($Text, "ü", "ü")
    $Text = StringReplace($Text, "Ãœ", "Ü")
    $Text = StringReplace($Text, "ä", "ä")
    $Text = StringReplace($Text, "Ä", "Ä")
    $Text = StringReplace($Text, "Ö", "Ö")
    $Text = StringReplace($Text, "ö", "ö")
    $Text = StringReplace($Text, "ß", "ß")
    $Text = StringReplace($Text, "amp;", "")
    $Text = StringReplace($Text, "&quot;", "''")
    $Text = StringReplace($Text, ":", "")
    $Text = StringReplace($Text, "/", "-")
    $Text = StringReplace($Text, "\", "-")
    $Text = StringReplace($Text, "<", "(")
    $Text = StringReplace($Text, ">", ")")
    $Text = StringReplace($Text, "*", "+")
    $Text = StringReplace($Text, "?", "")
    $Text = StringReplace($Text, "|", "-")
    $Text = StringReplace($Text, '"', "''")
    Return $Text
    EndFunc ;==>Name

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

    Func Dl($li, $s, $index)
    $s = StringReplace($s, " ", "|")
    If GUICtrlRead($Label1) = "Downloadstatus:" Then
    IniWrite(@TempDir & "\a.ini", "a", "a", 1)
    $p = 1
    ElseIf GUICtrlRead($Label4) = "Downloadstatus:" Then
    IniWrite(@TempDir & "\a.ini", "a", "a", 2)
    $p = 2
    ElseIf GUICtrlRead($Label7) = "Downloadstatus:" Then
    IniWrite(@TempDir & "\a.ini", "a", "a", 3)
    $p = 3
    EndIf
    _GUICtrlListView_SetItemText($List1, $index, "Download bei Download" & $p, 1)
    ShellExecute(@ScriptFullPath, $li & " " & $s)
    Sleep(5000)
    Start($las)
    EndFunc ;==>Dl

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

    Func Shockwave($Link_S)
    $Link_S = StringReplace($Link_S, "%3F", "?", 0, 1)
    $Link_S = StringReplace($Link_S, "%3D", "=", 0, 1)
    $Link_S = StringReplace($Link_S, "%3A", ":", 0, 1)
    $Link_S = StringReplace($Link_S, "%26", "&", 0, 1)
    $Link_S = StringReplace($Link_S, "%2F", "/", 0, 1)
    $Link_S &= "&portalId=de"
    Return $Link_S
    EndFunc ;==>Shockwave

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

    Func Download()
    $Last = 0
    $Link = $cmdline[1]
    $Pfad = StringReplace($cmdline[2], "|", " ")
    $Size = InetGetSize($Link)
    Switch $Read
    Case 1
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:1]", "Downloadstatus: " & Round(@InetGetBytesRead / 1024 / 1024, 1) & " MB / " & Round($Size / 1024 / 1024, 1) & " MB")
    Case 2
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:4]", "Downloadstatus: " & Round(@InetGetBytesRead / 1024 / 1024, 1) & " MB / " & Round($Size / 1024 / 1024, 1) & " MB")
    Case 3
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:7]", "Downloadstatus: " & Round(@InetGetBytesRead / 1024 / 1024, 1) & " MB / " & Round($Size / 1024 / 1024, 1) & " MB")
    EndSwitch
    DirCreate(@HomeDrive & "\Downloads")
    InetGet($Link, $Pfad, 1, 1)
    $Zeit = TimerInit()
    $Zeit2 = TimerInit()
    $abb = ""
    While @InetGetActive And $abb = ""
    If TimerDiff($Zeit2) > 400 Then
    If TimerDiff($Zeit) > 1000 Then
    $h = 0
    $min = 0
    $sec = 0
    Switch $Read
    Case 1
    If TimerDiff($Zeit2) > 400 Then
    If TimerDiff($Zeit) > 1000 Then
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:1]", "Downloadstatus: " & Round(@InetGetBytesRead / 1024 / 1024, 1) & " MB / " & Round($Size / 1024 / 1024, 1) & " MB")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:2]", "Geschwindigkeit: " & Round((@InetGetBytesRead - $Last) / 1024 * (1000 / 400), 0) & " KB/s")
    $Last = @InetGetBytesRead
    $sec_temp = Round(($Size * (TimerDiff($Zeit) / 1000) / @InetGetBytesRead) - (TimerDiff($Zeit) / 1000), 0)
    $min = StringLeft($sec_temp / 60, StringInStr($sec_temp / 60, ".", 1) - 1)
    $sec = $sec_temp - $min * 60
    Do
    If $min > 60 Then
    $h += 1
    $min -= 60
    EndIf
    Until $min <= 60

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

    For $i = 60 To 3600 Step 60
    If $sec = $i Then
    $min = $i / 60
    $sec = 0
    EndIf
    Next

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

    For $i = 60 To 1800 Step 60
    If $min = $i Then
    $h = $i / 60
    $min = 0
    EndIf
    Next

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

    If $min = "" Then $min = 0
    If TimerDiff($Zeit) > 2500 Then ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:3]", "verbleibende Zeit: " & $h & " h " & $min & " min " & $sec & " sek")
    $Zeit2 = TimerInit()
    $sec_temp = 0
    Else
    $Last = @InetGetBytesRead
    EndIf
    EndIf
    Case 2
    If TimerDiff($Zeit2) > 400 Then
    If TimerDiff($Zeit) > 1000 Then
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:4]", "Downloadstatus: " & Round(@InetGetBytesRead / 1024 / 1024, 1) & " MB / " & Round($Size / 1024 / 1024, 1) & " MB")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:5]", "Geschwindigkeit: " & Round((@InetGetBytesRead - $Last) / 1024 * (1000 / 400), 0) & " KB/s")
    $Last = @InetGetBytesRead
    $sec_temp = Round(($Size * (TimerDiff($Zeit) / 1000) / @InetGetBytesRead) - (TimerDiff($Zeit) / 1000), 0)
    $min = StringLeft($sec_temp / 60, StringInStr($sec_temp / 60, ".", 1) - 1)
    $sec = $sec_temp - $min * 60
    Do
    If $min > 60 Then
    $h += 1
    $min -= 60
    EndIf
    Until $min <= 60

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

    For $i = 60 To 3600 Step 60
    If $sec = $i Then
    $min = $i / 60
    $sec = 0
    EndIf
    Next

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

    For $i = 60 To 1800 Step 60
    If $min = $i Then
    $h = $i / 60
    $min = 0
    EndIf
    Next

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

    If $min = "" Then $min = 0
    If TimerDiff($Zeit) > 2500 Then ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:6]", "verbleibende Zeit: " & $h & " h " & $min & " min " & $sec & " sek")
    $Zeit2 = TimerInit()
    $sec_temp = 0
    Else
    $Last = @InetGetBytesRead
    EndIf
    EndIf
    Case 3
    If TimerDiff($Zeit2) > 400 Then
    If TimerDiff($Zeit) > 1000 Then
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:7]", "Downloadstatus: " & Round(@InetGetBytesRead / 1024 / 1024, 1) & " MB / " & Round($Size / 1024 / 1024, 1) & " MB")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:8]", "Geschwindigkeit: " & Round((@InetGetBytesRead - $Last) / 1024 * (1000 / 400), 0) & " KB/s")
    $Last = @InetGetBytesRead
    $sec_temp = Round(($Size * (TimerDiff($Zeit) / 1000) / @InetGetBytesRead) - (TimerDiff($Zeit) / 1000), 0)
    $min = StringLeft($sec_temp / 60, StringInStr($sec_temp / 60, ".", 1) - 1)
    $sec = $sec_temp - $min * 60
    Do
    If $min > 60 Then
    $h += 1
    $min -= 60
    EndIf
    Until $min <= 60

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

    For $i = 60 To 3600 Step 60
    If $sec = $i Then
    $min = $i / 60
    $sec = 0
    EndIf
    Next

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

    For $i = 60 To 1800 Step 60
    If $min = $i Then
    $h = $i / 60
    $min = 0
    EndIf
    Next

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

    If $min = "" Then $min = 0
    If TimerDiff($Zeit) > 2500 Then ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:9]", "verbleibende Zeit: " & $h & " h " & $min & " min " & $sec & " sek")
    $Zeit2 = TimerInit()
    $sec_temp = 0
    Else
    $Last = @InetGetBytesRead
    EndIf
    EndIf
    EndSwitch
    EndIf
    EndIf
    Sleep(30)
    $abb = ControlGetText("Multidownloader", "", "[CLASS:Static; INSTANCE:10]")
    WEnd
    InetGet("abort")
    Sleep(100)
    If $abb <> "" Then FileDelete($Pfad)
    Switch $Read
    Case 1
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:1]", "Downloadstatus:")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:2]", "Geschwindigkeit:")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:3]", "verbleibende Zeit:")
    IniWrite(@TempDir & "\fertig.ini", "a", "1", "1")
    Case 2
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:4]", "Downloadstatus:")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:5]", "Geschwindigkeit:")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:6]", "verbleibende Zeit:")
    IniWrite(@TempDir & "\fertig.ini", "a", "2", "1")
    Case 3
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:7]", "Downloadstatus:")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:8]", "Geschwindigkeit:")
    ControlSetText("Multidownloader", "", "[CLASS:Static; INSTANCE:9]", "verbleibende Zeit:")
    IniWrite(@TempDir & "\fertig.ini", "a", "3", "1")
    EndSwitch
    Exit
    EndFunc ;==>Download

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

    Func OnAutoItExit()
    FileDelete(@TempDir & "\a.ini")
    EndFunc ;==>OnAutoItExit

    [/autoit]

    Edit: Habe bei 1 Button enable mit disable vertauscht xD

  • Das Downloaden von Videos von Platformen darf man machen solange man das Copyright beachtet und das liegt bei jeden selber und das kann ich auch nicht beeinflussen