IfNotExist %1% { MsgBox File not found. Please specify the path to a .gvp file of type text/google-video-pointer. ExitApp 255 } Loop Read, %1% { srch := " " repl := "_" SplitFirst(tagn, value, A_LoopReadLine, ":") StringReplace tagn, tagn, %srch%, %repl%, 1 oldt := %tagn% If (StrLen(oldt)>0) { %tagn% = %oldt%`n%value% } Else { %tagn% = %value% } } MsgBox 4132, Download Google Video, You are about to download the following video file from Google Video:`n`n%title%`n`n%description%`n`nDo you want to continue? IfMsgBox Yes { Run %url% ExitApp } Else { ExitApp 1 } SplitFirst(ByRef OutLeft, ByRef OutRight, InpText, InpSep) { StringGetPos SepPos, InpText, %InpSep%, L If (SepPos >= 0) { StringLeft OutLeft, InpText, %SepPos% RemChars := StrLen(InpText)-SepPos-1 StringRight OutRight, InpText, %RemChars% } Else { OutLeft := InpText OutRight := "" } }
Cheers,
-mARKUS
P.S.: I know you could change it to accept an URL to the .gvp-file, but this way you would have to handle 404-pages, etc. by the script.
P.P.S.: Maybe I should add deletion of the .gvp-file after initiating the download?