=sinister= Posted August 17, 2008 Share Posted August 17, 2008 I tried this: $oIE = _IEAttach ('test.gif', 'Embedded', $i) _IEBodyWriteHTML ($oIE, "") However, it never removes the image. I also tried using the search type "HTML". Link to comment Share on other sites More sharing options...
NELyon Posted August 17, 2008 Share Posted August 17, 2008 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 More sharing options...
=sinister= Posted August 17, 2008 Author Share Posted August 17, 2008 The html <img> tag is used. My test html file is like this: <body> <img src="www.egocities.com/images/watermark/geocities.gif"> </body> My goal is to remove the entire <img> tag using the _IE functions. Link to comment Share on other sites More sharing options...
DaleHohm Posted August 17, 2008 Share Posted August 17, 2008 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 More sharing options...
=sinister= Posted August 17, 2008 Author Share Posted August 17, 2008 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 More sharing options...
DaleHohm Posted August 17, 2008 Share Posted August 17, 2008 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 DeSwa 1 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 More sharing options...
=sinister= Posted August 17, 2008 Author Share Posted August 17, 2008 Dale, That was a perfect example of what I needed, thanks! 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