JohnOne Posted April 18, 2013 Posted April 18, 2013 (edited) I'm a little confused as to how to get to a method I would like to use. Below, I have an IWebBrowser2 interface and from it an IHTMLDocument2 interface, after having been attached to a running IE instance. I thought it was much like _IEAttach and what I would end up with is the same as what is returned from _IEDocGetObj ($o_object.document) and from it I could access for instance the getElementById method as used in _IEGetObjById ($o_object.document.getElementById). However that method does not seem to be available, and I'm not sure why. Hoping someone can advise. Basically I thought I would have access to the methods listed here http://msdn.microsoft.com/en-us/library/ie/hh772117?v=vs.85.aspx but instead have access to methods such as... get_activeElement get_alinkColor get_all get_anchors etc... I get the interface with code below. IDispatch * pHtmlDocDisp = nullptr; HTMLDoc2 * pHtmlDoc2 = nullptr; pHtmlDocDisp->QueryInterface(IID_IHTMLDocument2, (void**)&pHtmlDoc2); Have I got the wrong object for what I'm after here? Edited April 18, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
DaleHohm Posted April 18, 2013 Posted April 18, 2013 What is the object type? You can use ObjName 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
JohnOne Posted April 18, 2013 Author Posted April 18, 2013 (edited) Type of my object "pHtmlDoc2" is defined in MsHTML.h as "typedef interface IHTMLDocument2 IHTMLDocument2;" Edited April 18, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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