gamerman2360 Posted May 21, 2006 Share Posted May 21, 2006 (edited) Func OpenHTML($html, $URL = "") If $URL Then $html = StringReplace($html, '<head>', '<head><base href="' & $URL & '" />', 1) If Not @extended Then $html = '<base href="' & $URL & '" />' & $html EndIf $oIE = ObjCreate("InternetExplorer.Application.1") With $oIE .visible = 1 .navigate("about:blank") .document.write($html) EndWith EndFuncNo more FileWrite(), Run(), FileDelete(). Requires beta. Edited May 30, 2006 by gamerman2360 Link to comment Share on other sites More sharing options...
ConsultingJoe Posted May 21, 2006 Share Posted May 21, 2006 Func OpenHTML($html) $oIE = ObjCreate("InternetExplorer.Application.1") With $oIE .visible = 1 .navigate("about:blank") .document.write($html) EndWith EndFuncNo more FileWrite(), Run(), FileDelete(). Requires beta.nice, this is very useful and simple, thanks [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
YoseMite Posted May 21, 2006 Share Posted May 21, 2006 Thank you, i've seen it al before? Link to comment Share on other sites More sharing options...
DaleHohm Posted May 21, 2006 Share Posted May 21, 2006 (edited) Func OpenHTML($html) $oIE = ObjCreate("InternetExplorer.Application.1") With $oIE .visible = 1 .navigate("about:blank") .document.write($html) EndWith EndFuncNo more FileWrite(), Run(), FileDelete(). Requires beta.I certainly don't want to discourage anyone from learning the DOM and all of it's details, but this is how the same is done with IE.au3: #include <IE.au3> $oIE = _IECreate() _IEDocWriteHTML($oIE, $html) Dale Edit: typo Edited May 21, 2006 by DaleHohm 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...
ConsultingJoe Posted May 21, 2006 Share Posted May 21, 2006 I certainly don't want to discourage anyone from learning the DOM and all of it's details, but this is how the same is done with IE.au3: #include <IE.au3> $oIE = _IECreate() _IEDocWriteHTML($oIE, $html) Dale Edit: typoOh, yeah, thanks dale. but this could be used if the script didn't rely too much on IE.au3 Thanks [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
Lakes Posted May 22, 2006 Share Posted May 22, 2006 Hmm, Ebay used to have a nice basic HTML editor, now you have to put the tags in yourself, this could be used to do something similar... 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
gamerman2360 Posted June 3, 2006 Author Share Posted June 3, 2006 Edited so you can set the base URL for relative links within the document. 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