Eambo Posted January 20, 2011 Posted January 20, 2011 (edited) I'm sure I'm doing something dumb :-( Note: DownloadLine is a variable that will attach to the end of the web url. EG: www.website.com/FILE.EXE (FILE.EXE being the DownloadLine) $DownloadFolder=@ScriptDir & "\" & $DownloadLine MsgBox(0, "Download Line", $DownloadLine) MsgBox(0, "Download Folder", $DownloadFolder) $FileURL = "http://www.website.com/" & $DownloadURL MsgBox(0, "Download URL", $FileURL) $FileSize = InetGetSize($FileURL) InetGet($FileURL,$DownloadFolder,0,1) ProgressOn("","") While @InetGetActive $Percentage = @InetGetBytesRead * 100 / $FileSize ProgressSet($Percentage,"Downloaded " & @InetGetBytesRead & " of " & $FileSize & " bytes","Downloading " ) Sleep(250) Wend ProgressOff() Edited January 20, 2011 by Eambo
Eambo Posted January 20, 2011 Author Posted January 20, 2011 (edited) Sorry, these were on up the code :-) $ReplaceErrorText = ''; Replace with nothing $ReplaceForwardSlash = '/'; Replace with nothing $DownloadLine = StringReplace ($ErrorLine, '[ERROR]' & @ScriptDir & '\', $ReplaceErrorText); Scans $Errorline for the quoted lines, and replaces with nothing $DownloadURL = StringReplace ($DownloadLine,'\', $ReplaceForwardSlash); Above it's essentially making two versions of the same thing. One with a forwardslash for the WebURL, and one with a blackslash for the directory. I'll probably clean this up at a later point, I just wanted to get the concept down and working :-) Edit: PS, thank you for your help :-) Edited January 20, 2011 by Eambo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now