eEniquEe Posted June 1, 2011 Share Posted June 1, 2011 (edited) Hi again everyone,I'm having some little problem here. I can obtain the source of a page by using _InetGetSource. And I have also Embed IE window in my GUI. I just wonder if there's actually a way to tell IE to build a page from the source I have? I may use _IENavigate, but it would just downloaded everything twice which makes it brandwidth consuming for the server.I have tried to use both _IEBodyWriteHTML, and _IEDocWriteHTML; then use _IEAction($oIE, "refresh"). But it doesn't seem to work. Have I done anything wrong?Thanks everyone in advance, and have a great day. Edited June 1, 2011 by eEniquEe Link to comment Share on other sites More sharing options...
hannes08 Posted June 1, 2011 Share Posted June 1, 2011 Hi eEniquEe, how about writing the HTML to a temporary file and then displaying it? Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
eEniquEe Posted June 1, 2011 Author Share Posted June 1, 2011 Hi eEniquEe,how about writing the HTML to a temporary file and then displaying it? Thank you very much, it works like a charm. So, there's no way to construct a web-page directly from source without having to save the source into a temporary file first, right? I wonder if there's some other way to tackle this problem.Thanks, Link to comment Share on other sites More sharing options...
hannes08 Posted June 1, 2011 Share Posted June 1, 2011 Hi eEniquE, I'm pretty sure that ther's a way to do what you want. But honestly I have no clue how to do it. So what I showed you may be a sub-optimal way to do this. We'll see maybe until tomorrow somebody else has had a better idea. :-) Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
JohnOne Posted June 1, 2011 Share Posted June 1, 2011 INetRead() INetGet() _InetGetSource() udf Maybe. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
hannes08 Posted June 1, 2011 Share Posted June 1, 2011 Well, he already has the source. What he wants is to display a page without having to save the source into a file. Sth like open a webpage with a variable as source. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
ReFran Posted June 1, 2011 Share Posted June 1, 2011 "What he wants is to display a page without having to save the source into a file." That is done with: _IEDocWriteHTML ( ByRef $o_object, $s_html ) See example in the help file. HTH, Reinhard Link to comment Share on other sites More sharing options...
JohnOne Posted June 1, 2011 Share Posted June 1, 2011 I see, then eEniquEe needs to post the code so someone can point out an error. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
smartee Posted June 1, 2011 Share Posted June 1, 2011 hi eEniquEe Here's a quick example :#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> $oIE = _IECreateEmbedded() $Form1 = GUICreate("_IEDocWriteHTML Demo", 600, 400) $Obj1 = GUICtrlCreateObj($oIE, 5, 5, 590, 390) _IENavigate($oIE, "about:blank") GUISetState(@SW_SHOW) SplashTextOn(@ScriptDir, "Please wait", 200, 50) _IEDocWriteHTML($oIE, BinaryToString(InetRead("http://www.autoitscript.com"))) ;_IEAction($oIE, "refresh") ;It is sometimes necessary to refresh the page after writing (e,g, after creating a FRAMESET) SplashOff() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Hope this helps , -smartee 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