Re: by the way by ljb
ljb
Tue Apr 05 07:19:21 CDT 2005
"Dan Khanseitov" <dankh(nospam@)mail.ru> wrote in message
news:mn.29d07d54d62471a5.29529@mesnews.fr...
> Hi!
>
> Try tu use this example:
>
> function sendData()
> {
> var User, Password;
> var oXMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
> User = Submit.UserID.value;
> Password = Submit.Psw.value;
> oXMLHTTP.open("get", "/web/welcome.asp", false, User, Password);
> oXMLHTTP.send("xmlDoc");
> window.location.href="/web/welcome.asp"
> }
>
> It was taken from microsoft's book and used before for form
> authiorization.
> May be it helps.
>
> Regards,
> Dan
>
> Joshua Weir pretended :
> > I was thinking that using the internet explorer DOM would be suitable,
but
> > does this support https? And would this be the best approach?
> >
> > "Joshua Weir" wrote:
> >
> >> Hi,
> >>
> >> Not sure if i got the right forum, i want to do this with a vbs file
> >> anyways, or dos cmd.
> >>
> >> I have a specific https url that points to a .xls file:
> >>
> >> ie. https://url/test.xls
> >>
> >> When i enter the url into a web browser, i firstly get the 'single sign
on'
> >> authentication box (entering my username and password for https access)
and
> >> then i get a save dialog box where i can save the file.
> >>
> >> I want to automate this using the easiest method possible. I dont know
where
> >> to look, what would be the best approach?
> >>
> >> Thanks heaps,
> >>
> >> Josh
>
>
If the file you want is binary or an image use the ADO stream object
set oHTTP = CreateObject("Microsoft.XMLHTTP")
set oStream = createobject("adodb.stream")
oStream.type = 1
oHTTP.open "GET", sSource, False
oHTTP.send
oStream.open
oStream.write oHTTP.responseBody
oStream.savetofile sDest