ToyBoi Posted August 8, 2008 Posted August 8, 2008 so IE action can do save as but it doesn't seem to be able to save in a location that is a variable say $address , and if i use send("!f") ... etc , it also just saves it at the default location, in my case it's the desktop. how do i get it to save at the location that is $address?
DW1 Posted August 8, 2008 Posted August 8, 2008 I am not sure if you are trying to save the page as html of if MHT is ok, but this is what I use to save a page as mht (one file for all resources and page): ;EXAMPLE: ;~ _INetGetMHT( "http://docs.phplivesupport.com/viewarticle.php?aid=76&pid=6&uid=1", "C:\IISandPHPonWin2K.MHT" ) Func _INetGetMHT( $url, $file ) Local $msg = ObjCreate("CDO.Message") If @error Then Return False Local $ado = ObjCreate("ADODB.Stream") If @error Then Return False With $ado .Type = 2 .Charset = "US-ASCII" .Open EndWith $msg.CreateMHTMLBody($url, 0) $msg.DataSource.SaveToObject($ado, "_Stream") FileDelete($file) $ado.SaveToFile($file, 1) $msg = "" $ado = "" Return True EndFunc AutoIt3 Online Help
ToyBoi Posted August 8, 2008 Author Posted August 8, 2008 I am not sure if you are trying to save the page as html of if MHT is ok, but this is what I use to save a page as mht (one file for all resources and page): ;EXAMPLE: ;~ _INetGetMHT( "http://docs.phplivesupport.com/viewarticle.php?aid=76&pid=6&uid=1", "C:\IISandPHPonWin2K.MHT" ) Func _INetGetMHT( $url, $file ) Local $msg = ObjCreate("CDO.Message") If @error Then Return False Local $ado = ObjCreate("ADODB.Stream") If @error Then Return False With $ado .Type = 2 .Charset = "US-ASCII" .Open EndWith $msg.CreateMHTMLBody($url, 0) $msg.DataSource.SaveToObject($ado, "_Stream") FileDelete($file) $ado.SaveToFile($file, 1) $msg = "" $ado = "" Return True EndFunchi thanks for the reply, so which variable is your custom location, and actualy, mht wouldn't work, it needs to be in either txt or html
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