Run('ffmpeg -i '&$id&'.flv -vcodec mpeg1video -acodec copy -b 600 '&$id&'.mpg')
Da bekomme ich folgenden Fehler:
Spoiler anzeigen
E:\myvideode.au3(31,21) : WARNING: $id: possibly used before declaration.
Run('ffmpeg -i '&$id&
~~~~~~~~~~~~~~~~~~~~^
E:\myvideode.au3(31,21) : ERROR: $id: undeclared global variable.
Run('ffmpeg -i '&$id&
~~~~~~~~~~~~~~~~~~~~^
E:\myvideode.au3 - 1 error(s), 1 warning(s)
Aber so geht es außer das er die test.bat nicht löschen möchte, obwohl ich ihm diesen gesagt habe (Zeile : 43)
Spoiler anzeigen
#include<Inet.au3>
#include<GUIConstants.au3>
#include<File.au3>
PluginOpen("pthreadGC2.dll")
[/autoit] [autoit][/autoit] [autoit]GUICreate("My Video.de Downloader", 273, 105, 193, 115, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
DIM $DwnInput = GUICtrlCreateInput("2354666", 8, 24, 257, 21)
GUICtrlCreateLabel("www.myvideo.de Video-Nummer(ID):", 8, 8, 268, 15)
$start = GUICtrlCreateButton("&Start", 8, 48, 128, 25, 0)
$Progress = GUICtrlCreateProgress(8, 80, 257, 16)
$abb = GUICtrlCreateButton("A&bbruch", 137, 48, 128, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $start
GUICtrlSetState($start,$GUI_DISABLE)
$link = _LinkLoad(GUICtrlRead($DwnInput))
InetGet($link, @ScriptDir&"\"&GUICtrlRead($DwnInput)&".flv")
If @error Then
MsgBox(0,"Download","Downloaderror")
Else
MsgBox(0,"","Download abgeschlossen! Datei wird nun umgewandelt.")
EndIf
If Not FileExists("test.bat") Then _FileCreate("test.bat")
FileOpen("test.bat", 2)
FileWrite("test.bat", '"ffmpeg" -i ')
FileWrite("test.bat", (GUICtrlRead($DwnInput)))
FileWrite("test.bat", ".flv")
FileWrite("test.bat", " -vcodec mpeg1video -acodec copy -b 600 ")
FileWrite("test.bat", GUICtrlRead($DwnInput))
FileWrite("test.bat", ".mpg")
FileClose("test.bat")
GUIDelete()
RunWait(@ComSpec & " /c " & 'test.bat',"", @SW_HIDE)
FileDelete(@ScriptDir & "\test.bat")
MsgBox(0,"Fertig","Fertig")
Exit
EndSwitch
WEnd
Func _LinkLoad($id)
$url = "http://www.myvideo.de/watch/"&$id
$source = _INetGetSource($url)
$array = StringRegExp($source, "((http://myvideo-)\d+(.)\w+(.)\w+(.net)(/)\w+(/)\w+(/)\w+(/)"&$id&"+(.flv)){1}", 2)
If IsArray($array) Then
$VidLink = $array[1]
Return $VidLink
Else
Return 1
EndIf
EndFunc