Source code released: <!-- m -->http://gentee.com/ph...hp?p=9822#p9822<!-- m -->
View the code: <!-- m -->http://dl.dropbox.co... ... 0/URLGet.g<!-- m -->
URLGet - Internet Explorer based Downloader
Started by
SKAN
, Oct 01 2011 03:51 PM
43 replies to this topic
Is it possible with this tool to do something similar to the IE menu item, "Save As Webpage, complete(*.htm, *.html)" so that the images and the css file is downloaded to a separate folder other than the source html? It enables the user to view the web page offline.
No need for a tool, should already be possible with AutoHotkey_L. I am no expert in COM, but - you could get a solution by posting a request in ask-for-help section.
#17
-
Posted 01 March 2012 - 11:58 AM
I don't think it's an easy task even with _L But thanks for the reply.
#18
-
Posted 01 March 2012 - 01:53 PM
i just found this out and did some tests!
i think its awesome and i want to implement it in my script for downloading some data instead of internetfileread that im using now because it makes my script hang
so my question is :
how do i detect when the download is finished?
i want to download one file
when its finished get some data out of it with xpath
download next file using the data from before and so on
i think its awesome and i want to implement it in my script for downloading some data instead of internetfileread that im using now because it makes my script hang
so my question is :
how do i detect when the download is finished?
i want to download one file
when its finished get some data out of it with xpath
download next file using the data from before and so on
#19
-
Posted 02 March 2012 - 08:29 PM
how do i detect when the download is finished?
You could track the progress by calling URLGet in four parameter mode
OR
If you require a simple solution like URLDownloadToFile, the following wrapper function should be sufficient:
URLGet( URL, MMH="Min" ) { ; MMH should be Max Min or Hide RunWait, %COMSPEC% /c URLGet "%URL%" %True% > %A_Temp%\URLGet.tmp,, %MMH% UseErrorLevel URLGetErrorLevel := ErrorLevel FileRead, CacheFileFullPath, %A_Temp%\URLGet.tmp Return CacheFileFullPath, ErrorLevel := URLGetErrorLevel }
URLGet() function will return the full path to Cache file if the download was successful.
URLGet() function will return null if the download fails or URLGet.exe is terminated by the user.
On either case, ErrorLevel will be set.
i want to download one file
when its finished get some data out of it
You may simply FileRead it like follows:
FileRead, HTM, % URLGet( "[color=darkred]http://www.google.com[/color]" ) MsgBox, % HTM
#20
-
Posted 03 March 2012 - 04:20 AM
that little wrapper worked fine
download speed is MUCH faster and most of all my script doesnt hang anymore while im downloading!
thanks alot 8)
download speed is MUCH faster and most of all my script doesnt hang anymore while im downloading!
thanks alot 8)
#21
-
Posted 03 March 2012 - 12:22 PM
Brilliant!
Would it be possible to add a parameter for outputfolder/-file?
Would it be possible to add a parameter for outputfolder/-file?
#22
-
Posted 04 May 2012 - 08:17 PM
Would it be possible to add a parameter for outputfolder/-file?
URLDownloadToCacheFile() does not accept a target path and will only download to IE Cache.
Workaround is better done outside.
If you need to control download filename and path, you may use FileCopy/FileMove command like follows:
FileMove, % URLGet( "[color=#FF0000]http://www.google.com[/color]" ), [color=#FF0000]C:\goo.htm[/color] URLGet( URL, MMH="Min" ) { ; MMH should be Max Min or Hide RunWait, %COMSPEC% /c URLGet "%URL%" %True% > %A_Temp%\URLGet.tmp,, %MMH% UseErrorLevel URLGetErrorLevel := ErrorLevel FileRead, CacheFileFullPath, %A_Temp%\URLGet.tmp Return CacheFileFullPath, ErrorLevel := URLGetErrorLevel }
To specify 'Output folder', you may use SetWorkingDir command:
SetWorkingDir, C:\ RunWait %A_ScriptDir%\URLGet.exe http://www.google.com SetWorkingDir, %A_ScriptDir%
Edit: The following is simpler :oops:
RunWait URLGet.exe http://www.google.com, [color=#FF0000]C:\Test[/color]
Note: URLGet handles path in Unicode.
#23
-
Posted 05 May 2012 - 12:27 AM
Have you considered the capabilities of a download manager?
Such as using multiple concurrent downloads to copy pieces of the file.
Such as using multiple concurrent downloads to copy pieces of the file.
#24
-
Posted 05 May 2012 - 08:05 AM
Have you considered the capabilities of a download manager?
Such as using multiple concurrent downloads to copy pieces of the file.
Will be too tough for me.
#26
-
Posted 09 May 2012 - 03:08 PM
Gui for what?.. progress? The Gui will become unresponsive when connection is bad unless I use a worker thread.
#28
-
Posted 03 October 2012 - 05:21 AM
Probably he means a GUI to enter URLs into and a dialogue to save to, something like that, kinda like a download manager.
#29
-
Posted 03 October 2012 - 07:05 AM
GUI will be useful only if it is url-drag-drop capable.
Here is Sean's code, but I am unable to figure out the re-usable code.
Here is Sean's code, but I am unable to figure out the re-usable code.
#30
-
Posted 03 October 2012 - 07:15 AM