civilcalc Posted August 23, 2011 Share Posted August 23, 2011 I am trying to get the text of a control with the following properties; >>>> Window <<<< Title: Somewindow Class: PTIODEVICE Position: 1, 3 Size: 486, 366 Style: 0x16040000 ExStyle: 0x00000100 Handle: 0x00181988 >>>> Control <<<< Class: Internet Explorer_Server Instance: 3 ClassnameNN: Internet Explorer_Server3 Name: Advanced (Class): [CLASS:Internet Explorer_Server; INSTANCE:3] ID: Text: Position: 3, 317 Size: 233, 40 ControlClick Coords: 171, 25 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x001B2382 >>>> Mouse <<<< Position: 178, 348 Cursor ID: 2 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< I plan on using the _IEBodyReadText function, but I dont seem to able to figure out how to get the object variable. Anyone help? Thanks in advance :-) Link to comment Share on other sites More sharing options...
JohnOne Posted August 23, 2011 Share Posted August 23, 2011 $oIE = _IEAttatch("Somewindow") $sBody = _IEBodyReadText($oIE) 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...
civilcalc Posted August 23, 2011 Author Share Posted August 23, 2011 I just keep getting told that there is no match. The control in question is within the window. Link to comment Share on other sites More sharing options...
JohnOne Posted August 23, 2011 Share Posted August 23, 2011 Use your browser view source, or if IE F12, fitefox, you can install firebug or similar to view the elements on a web page. 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...
civilcalc Posted August 23, 2011 Author Share Posted August 23, 2011 Its not actually an IE window, its an application with the Internet Explorer_Server; INSTANCE:3 embedded in it as a text box. Link to comment Share on other sites More sharing options...
JohnOne Posted August 23, 2011 Share Posted August 23, 2011 I dont know of any way you can get attached to that with the _IE* functions. Have you tried the usual methods of getting test from a control? 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...
DaleHohm Posted August 23, 2011 Share Posted August 23, 2011 Use _IEAttach with "embedded" and $i_instanceUse of "$i_instance" with the "embedded" mode: used to return a reference to a specific instance of a WebBrowser and is particularly useful when more than one exists in a particular window. If you pass a window title in $s_string using embedded mode, only the first window matching that title will be used. If the WebBrowser control you desire is in another window you must pass the HWnd of that window rather than the title, or use the advanced Window Title selection syntax available to the standard Win* functions.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...
civilcalc Posted August 23, 2011 Author Share Posted August 23, 2011 Use _IEAttach with "embedded" and $i_instanceDaleI love you! This has saved me sooooo much time. Do you have a charity in need of a donation? Link to comment Share on other sites More sharing options...
DaleHohm Posted August 23, 2011 Share Posted August 23, 2011 Either the Donate link here http://www.autoitscript.com/forum/ or the Juvenile Diabetes Research Foundation. 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