Jump to content

Recommended Posts

Posted

Dale,

The _IEAction "saveas" option does not allow saving the "complete" html. It only saves the html file itself (no images).

Here's a script to demonstrate:

#include <IE.Au3>
$sURL1 = "http://www.AutoItScript.com"
$oIE = _IECreate($sURL1, 1, 1, 1, 0)
If $oIE <> 0 Then
  _IEAction($oIE, "saveas")
EndIf

1. Run the test script, and when the Saveas window opens check the contents of the "Save as type:" list. You will see two options, "HTML File (*.htm;*html)" and "Text File (*.txt)". While this may look okay, it is not.

2. Go ahead and save the page as html. Check the results. There will be the Html file, but no *_Files directory.

3. Manually do another Saveas by clicking File, Saveas. Check the "Save as type:" list and you will see four entries, one of which is "Webpage, complete (*htm;*html)" and another is "Webpage, HTML only (*.htm;*.html)". It appears that _IEAction performs the "HTML only" method.

Can something be done to include the "complete" option?

I'm using Internet Explorer v7.0.5730.11 in Windows XP SP2.

Phillip

Posted

Unfortunately, no. I user document.execCommand("SaveAs") to do this and it works as you have noted. There are no other similar options to do this that I know of... searching found lots of people asking about this, but no solutions.

Unfortunately you'll need to resort to sending keystrokes.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...