ehdtkqorl123 Posted January 9, 2008 Share Posted January 9, 2008 What I am gonna do is to grab the contents in <body> of a website called http://asdf.comSo I am gonna use the following function.#include <IE.au3> _IEBodyReadText ( ByRef $o_object)The problem is that I have no idea how to declear the object for the parameter.I saw #include <IE.au3>$oIE = _IECreate("http://asdf.com/")$sText = _IEBodyReadText ($oIE)MsgBox(0, "Body Text", $sText)This works since _IECreate() returns object variable.But the bad thing is that this functions displays the explorer...I don't want to open an explorer.. just want to grab the contents by just executing the program.How can I create an appropriate object for http://asdf.com?Thanks in advance Link to comment Share on other sites More sharing options...
taurus905 Posted January 9, 2008 Share Posted January 9, 2008 What I am gonna do is to grab the contents in <body> of a website called http://asdf.com So I am gonna use the following function. #include <IE.au3> _IEBodyReadText ( ByRef $o_object) The problem is that I have no idea how to declear the object for the parameter. I saw #include <IE.au3> $oIE = _IECreate("http://asdf.com/") $sText = _IEBodyReadText ($oIE) MsgBox(0, "Body Text", $sText) This works since _IECreate() returns object variable. But the bad thing is that this functions displays the explorer... I don't want to open an explorer.. just want to grab the contents by just executing the program. How can I create an appropriate object for http://asdf.com? Thanks in advanceHi ehdtkqorl123, Is this what you want?#include <IE.au3> $oIE = _IECreate("http://asdf.com/") $sText = _IEBodyReadHTML ($oIE) MsgBox(0, "Body Text", $sText)taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs Link to comment Share on other sites More sharing options...
DaleHohm Posted January 9, 2008 Share Posted January 9, 2008 Note that _IECreate allows you to open an invisible browser and then use _IEQuit to close it. 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 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