pshankland Posted October 11, 2006 Share Posted October 11, 2006 I am using _IECreate to load a web page. I then use AutoIT to make a few mouse clicks, select a few buttons etc. After I have done this another IE window appears and I need to use _IEBodyReadText to get info from the page but I seem to be using the original object ID used for the first page. How can I find the Object ID of the new window so I can parse it to _IEBodyReadText? Thanks. Link to comment Share on other sites More sharing options...
pshankland Posted October 11, 2006 Author Share Posted October 11, 2006 Quick question about this... can I use the Window Handle of the IE screen that I have retrieved using WinGetHandle() and parse that to _IEBodyReadText() ? Thanks. Link to comment Share on other sites More sharing options...
DaleHohm Posted October 11, 2006 Share Posted October 11, 2006 Quick question about this... can I use the Window Handle of the IE screen that I have retrieved using WinGetHandle() and parse that to _IEBodyReadText() ?Thanks.No, but you can use a window handle (hwnd) in _IEAttach to get the object reference.Based on your first question though I doubt that is what you need to do. Most likely if you are using mouse clicks that change the state of the page, you need to use _IELoadWait($oIE) prior to trying to retrieve the body text.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...
pshankland Posted October 11, 2006 Author Share Posted October 11, 2006 Based on your first question though I doubt that is what you need to do. Most likely if you are using mouse clicks that change the state of the page, you need to use _IELoadWait($oIE) prior to trying to retrieve the body text.DaleNot quite as when you click on a button within the original IE window this causes a second window to open and it is the body text of this 2nd window which is what I am after.Does this make things a bit clearer?Pete. Link to comment Share on other sites More sharing options...
DaleHohm Posted October 11, 2006 Share Posted October 11, 2006 (edited) Not quite as when you click on a button within the original IE window this causes a second window to open and it is the body text of this 2nd window which is what I am after.Does this make things a bit clearer?Pete.Yes. In that case you'll need to use _IEAttach to get a reference to that browser.There are ways to get a handle for the new window but it involves event routines and some advanced topics and you'd need to dig into MSDN to get the detail.DaleEdit: typos Edited October 11, 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...
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