dburner Posted December 5, 2007 Share Posted December 5, 2007 Helo im having problems reading text from a YHTMLContainer control(a Yahoo Messenger conversation window). I want to read the text then send it with TCPSend. I readed a post with a similar problem on this forum but no one could find an answer . That post was from 2005. I hope a solution for this problem was found because AutoIt got better. Link to comment Share on other sites More sharing options...
dburner Posted December 6, 2007 Author Share Posted December 6, 2007 I found a this scipt on the internet that should get the text from a YHTML Container, the problem is that its in VB code and I dont know how to "convert it" to AutoIt3. Someone please help me converting it.Dim imclass As Long Dim yhtmlcontainer As Long Dim internetexplorerserver As Long imclass = FindWindow("imclass", vbNullString) yhtmlcontainer = FindWindowEx(imclass, 0&, "yhtmlcontainer", vbNullString) internetexplorerserver = FindWindowEx(yhtmlcontainer, 0&, "internet explorer_server", vbNullString) Call SendMessageByString(internetexplorerserver, WM_SETTEXT, 0&, TextBox1.Text) If internetexplorerserver = 0 Then MsgBox("No Window Was Found! or your code is bad.") Exit Sub End If End SubEnd ClassThis code was from http://www.vbforums.com/showthread.php?t=439503 Link to comment Share on other sites More sharing options...
DaleHohm Posted December 6, 2007 Share Posted December 6, 2007 So it would appear taht it has an embedded Internet Explorer_Server control... you should be able to use _IEAttach embedded to attach to it and use _IEBodyReadHTML to get the contentIf there is more than one Internet Explorer_Server control embedded, see: How to: get text from an 'Internet Explorer_Server' control http://www.autoitscript.com/forum/index.ph...mp;#entry437001 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...
dburner Posted December 7, 2007 Author Share Posted December 7, 2007 (edited) I get this error when i use _IEAttach in my test code. #include <IE.au3> Sleep(2000) _IEAttach("####### - Instant Message", "embedded") D:\Programe\AutoIt3\Include\IE.au3 (4088) : ==> Subscript used with non-Array variable.: If IsObj($aRet[4]) Then If IsObj($aRet^ ERROR >Exit code: 1 Time: 2.332 And im getting the same error when im tring to run from the example script from the help file. >"D:\Programe\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\Programe\AutoIt3\Examples\Helpfile\_IEAttach.au3" --> IE.au3 V2.3-1 Warning from function _IEAttach, $_IEStatus_NoMatch --> IE.au3 V2.3-1 Error from function _IEPropertyGet, $_IEStatus_InvalidDataType --> IE.au3 V2.3-1 Warning from function _IEAttach, $_IEStatus_NoMatch D:\Programe\AutoIt3\Include\IE.au3 (4088) : ==> Subscript used with non-Array variable.: If IsObj($aRet[4]) Then If IsObj($aRet^ ERROR >Exit code: 1 Time: 2.663 Edited December 7, 2007 by dburner Link to comment Share on other sites More sharing options...
autoitxp Posted December 7, 2007 Share Posted December 7, 2007 I think u didnt use Dim $aRet at top of ur code Dim $aRet Link to comment Share on other sites More sharing options...
DaleHohm Posted December 7, 2007 Share Posted December 7, 2007 I get this error when i use _IEAttach in my test code. #include <IE.au3> Sleep(2000) _IEAttach("####### - Instant Message", "embedded") D:\Programe\AutoIt3\Include\IE.au3 (4088) : ==> Subscript used with non-Array variable.: If IsObj($aRet[4]) Then If IsObj($aRet^ ERROR >Exit code: 1 Time: 2.332 And im getting the same error when im tring to run from the example script from the help file. >"D:\Programe\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\Programe\AutoIt3\Examples\Helpfile\_IEAttach.au3" --> IE.au3 V2.3-1 Warning from function _IEAttach, $_IEStatus_NoMatch --> IE.au3 V2.3-1 Error from function _IEPropertyGet, $_IEStatus_InvalidDataType --> IE.au3 V2.3-1 Warning from function _IEAttach, $_IEStatus_NoMatch D:\Programe\AutoIt3\Include\IE.au3 (4088) : ==> Subscript used with non-Array variable.: If IsObj($aRet[4]) Then If IsObj($aRet^ ERROR >Exit code: 1 Time: 2.663There are three examples in the helpfile. Can you please narrow it down and show code? Can you also try running the examples without the Yahoo Messenger window running, or see if it is perhaps related to any other unique applications you are running? Also, please try logging out and back in again to insure it is not caused by a foobar iexplore process on your system. 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...
dburner Posted December 7, 2007 Author Share Posted December 7, 2007 (edited) There are three examples in the helpfile. Can you please narrow it down and show code? First i tried with all of them in the same script. And got me the error mentioned above. Then i tried one at a time. It seems that only the last one gets an error. #include <IE.au3> $oIE = _IEAttach ("A Window Title", "embedded") Gives the error >"D:\Programe\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Ionut\Desktop\testing.au3" D:\Programe\AutoIt3\Include\IE.au3 (4088) : ==> Subscript used with non-Array variable.: If IsObj($aRet[4]) Then If IsObj($aRet^ ERROR >Exit code: 1 Time: 0.353 Can you also try running the examples without the Yahoo Messenger window runningI tried but i get the same error. Also, please try logging out and back in again to insure it is not caused by a foobar iexplore process on your system.I tried but i get the same error. I took a look in the IE.au3 file and I think my error comes from this funtion __IEControlGetObjFromHWND on the line $aRet = DllCall("oleacc.dll", "int", "ObjectFromLresult", "int", $lResult, "ptr", DllStructGetPtr($typUUID), _ "int", 0, "idispatch_ptr", "") I made a test script and after the DllCall i used a MsgBox to display @error. @error was 2("@error = 2 unknown "return type""). Edited December 7, 2007 by dburner Link to comment Share on other sites More sharing options...
DaleHohm Posted December 8, 2007 Share Posted December 8, 2007 What version of Windows? 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...
dburner Posted December 8, 2007 Author Share Posted December 8, 2007 (edited) I got Windows XP Professional SP2. Strange that on my computer it doesn't work because on my friends computer works . I have been tring to figure out for hours why it dosen't work and still no answer. Edited December 8, 2007 by dburner Link to comment Share on other sites More sharing options...
DaleHohm Posted December 8, 2007 Share Posted December 8, 2007 I got Windows XP Professional SP2.Strange that on my computer it doesn't work because on my friends computer works . I have been tring to figure out for hours why it dosen't work and still no answer. It looks like it is not your problem. Thanks for doing the testing -- it looks like it is something induced by changes in the latest version of AutoIt (DllCall) that I have not adjusted for.Sorry for time you've wasted on this -- I'll post more info as soon as we have it sorted out.thanks,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...
dburner Posted December 8, 2007 Author Share Posted December 8, 2007 (edited) Thanks for helping me. I hope you resolve the problem soon. When you do solve the problem please PM me or post in this forum. Edited December 8, 2007 by dburner Link to comment Share on other sites More sharing options...
DaleHohm Posted December 9, 2007 Share Posted December 9, 2007 After some analysis help from Valik, it is confirmed that this is broken until we get a new version of AutoIt. I'm really surprised we didn't catch this in the beta cycle for 3.2.10.0. There's nothing more I can do now - _IEAttach "embedded" is broken for now. 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