Shoutbox

[Question] Download zip file - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Question] Download zip file (/showthread.php?tid=71284)

[Question] Download zip file by tryxter on 02-01-2007 at 01:20 PM

How can I download a zip file from the internet using code?

I don't want WScript.Shell.run function downloading it for me, maybe any kind of ActiveX object.

Thanks


RE: [Question] Download zip file by Felu on 02-01-2007 at 01:33 PM

code:
function DonwloadFile(URL, LocalFile){
    var fso = new ActiveXObject('Scripting.FileSystemObject');
    LocalFile = fso.BuiltPath(LocalFile);
    return Interop.Call('urlmon', 'URLDownloadToFileW', 0, URL, LocalFile, 0, 0);
}
This might freeze WLM while downloading.
RE: [Question] Download zip file by tryxter on 02-01-2007 at 01:55 PM

quote:
Originally posted by Felu
code:
function DonwloadFile(URL, LocalFile){
    var FSO = new ActiveXObject('Scripting.FileSystemObject');
    var LocalFile = fso.BuiltPath(LocalFile);
    return Interop.Call('urlmon', 'URLDownloadToFileW', 0, URL, LocalFile, 0, 0);
}


What am I supposed to put on LocalFile? Path to the new file downloaded?
RE: [Question] Download zip file by Felu on 02-01-2007 at 02:00 PM

quote:
Originally posted by tryxter
What am I supposed to put on LocalFile? Path to the new file downloaded?

Yes [Image: msn_wink.gif].
RE: [Question] Download zip file by tryxter on 02-01-2007 at 02:02 PM

Works perfect. Thanks one more time!


RE: [Question] Download zip file by felipEx on 02-01-2007 at 10:30 PM

Download Files Using IE's Download Dialog   :P


code:
//Example:
Interop.Call("shdocvw", "DoFileDownload", "http://felipex.net/scripts/styles122.plsc");