frontmill Posted September 15, 2006 Share Posted September 15, 2006 i want to save a certain webpage with inetget, only, to view this page you need to login first, if i try to save the page it doesnt save the actual page but the login form. I know the password and username necessary to login. what can i do to save the page like i want it? thanks in advance... Link to comment Share on other sites More sharing options...
frontmill Posted September 16, 2006 Author Share Posted September 16, 2006 bump Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 16, 2006 Moderators Share Posted September 16, 2006 Have you tried the _IE functions? You may be SOL if you don't use some type of COM or figure out where it's submitting the login information to. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MHz Posted September 16, 2006 Share Posted September 16, 2006 (edited) This is a converted from VBScript that can download a webpage to a MHT file.Global $iMsg, $Flds, $iConf, $prueba, $cdoSuppressAll $iMsg = ObjCreate("CDO.Message") ; Create Message object $iConf = ObjCreate("CDO.Configuration") ; Create Message Configuration Object $Flds = $iConf.Fields ;Flds("http://schemas.microsoft.com/cdo/configuration/urlproxyserver") = "proxyname:80" ;Flds("http://schemas.microsoft.com/cdo/configuration/urlproxybypass")= "" ;Flds("http://schemas.microsoft.com/cdo/configuration/urlgetlatestversion")= True ;Flds.Update ; If you are under a proxy, you need that configuration parameters $iMsg.CreateMHTMLBody("http://www.dbforums.com/archive/index.php/t-783832.html", 0) ;, "Username", "Password" 'If needed (user & pass) Global $Stm $Stm = ObjCreate("ADODB.Stream") $Stm.Type = 2 ; TypeBinary $Stm.Charset = "US-ASCII" $Stm.Open Global $iDsrc, $Filepath $Filepath = "c:\archivename.mht" ; Path to save the file & filename $iDsrc = $iMsg.DataSource ; response.Write("Ha cargado el contenido de la pagina en el stream") $iDsrc.SaveToObject($Stm, "_Stream") FileDelete($Filepath) ; overwrite seems invalid $Stm.SaveToFile($Filepath, 1) ; 1 = overwrite if file existsThe overwrite seems to fail as to why I added FileDelete().Edit:Added a word "from" to the summary for clarity of being an AutoIt3 script. Edited September 16, 2006 by MHz Link to comment Share on other sites More sharing options...
frontmill Posted September 16, 2006 Author Share Posted September 16, 2006 doesnt work for me.. i still get the login form Link to comment Share on other sites More sharing options...
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