PartyPooper Posted June 13, 2008 Posted June 13, 2008 (edited) A simple UDF that can be used for downloading files via the internet. Includes a progress bar. Useful UDF for scripts that download files rather than having to code it in all the time.Sample usage:#include <INetDownloader.au3> Global $s_MyWebSite = "http://members.optusnet.com.au/partypooper"; authors web address OnDownloadFile() Func OnDownloadFile() _INetDownloader($s_MyWebSite, "Program.exe", -1, @DesktopDir) EndFunc;==>OnDownloadFile Format for the UDF is as follows:#include <INetDownloader.au3> Func _INetDownloader( Web Site, Remote Filename [, Local Filename [, Download Directory [, AutoOverwrite]]] )ParametersWeb Site - website containing the fileRemote Filename - filename to be downloaded.Local Filename - filename to be saved. Default (-1) = same as Remote FilenameDownload Directory - directory where file will be saved. Default (-1) = @TempDirAutoOverwrite - specifies whether or not to overwrite local file if found. Default (-1) = YesReturn ValueOn Success: Downloads and auto installs (if chosen), the update.On Failure: - sets @ERROR = 1 for function parameter errors - sets @ERROR = 2 if internet problems or file not found - sets @ERROR = 3 if file exists and is not overwrittenRemarksNil.Edit1: Updated UDF source - several bugfixes (24 downloads)NO LONGER BEING MAINTAINED - superseded by @InetFileUpdate Edited June 30, 2008 by PartyPooper
gseller Posted June 13, 2008 Posted June 13, 2008 Nice little downloader... The progress bar is a bit jittery, but I like it. Thank you for sharing...
PartyPooper Posted June 14, 2008 Author Posted June 14, 2008 Thanks. It's the standard AutoIt progress bar so I'm not sure what you mean by "jittery"? Oh, I updated the first post - forgot to add the download directory in the example above.
PartyPooper Posted June 15, 2008 Author Posted June 15, 2008 Updated script and squashed several bugs - see first post.
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