Jump to content

Replacing IE images.


Recommended Posts

If you're directly displaying the image without HTML, there is no HTML to remove. You have to navigate to a different page or use the HTML <img> tag if you want to erase the image from the page.

Link to comment
Share on other sites

remove it from what?

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

Link to comment
Share on other sites

Removing it from the page

Let's say my "test.jpg" is just a blank image.

$oIE = _IEAttach ('<img src=test2.jpg>', 'HTML', 1)
_IEBodyWriteHTML ($oIE, '<img src=test.jpg>')

My html file is this:

<html>
<header>
</header>
<body>
<img src=test2.jpg>
</body>
</html>

It will not work, nor will it work with the "Embedded" instead of "HTML".

Link to comment
Share on other sites

You can obviously only affect what is in the browser, not the source file.

Here are several examples that demonstrate what I think you wnat to do:

#include <ie.au3>
; 1
$oIE = _IE_Example()
sleep(2000)
_IEBodyWriteHTML($oIE, '<IMG src="http://www.autoitscript.com/images/download_autoit.png">')
; 2
$oIE = _IE_Example()
sleep(2000)
$oImg = _IETagnameGetCollection($oIE, "img", 0)
_IEPropertySet($oImg, "outerhtml", '<IMG src="http://www.autoitscript.com/images/download_autoit.png">')
; 3
$oIE = _IE_Example()
sleep(2000)
$oImg = _IETagnameGetCollection($oIE, "img", 0)
$oImg.src = "http://www.autoitscript.com/images/download_autoit.png"

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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...