College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
Posts
4,495
Internet Explorer_Server class window
Anyone know how to pull text out of this kind of control? It is an Internet Explorer_Server class control inside of a messenger window, namely Yahoo. The chat room text. I want to pull this data out and analyze it. I cant seem to even pull the handle out through code (but i can see it through Spy++). The parent is YHTMLContainer class, and the YHTMLContainer is the child to the IMClass class.
The following code executes correctly:
VB Code:
hWndTmp = FindWindow("IMClass", "*Replaced with WindowTitle*")
Kinda confused next.. The Internet Explorer_Server is the child of a child, per se.. the child of YHTMLContainer.... how would I get the handle.. i tried doing a FindWindow on just the class Internet Explorer_Server but kept returning nothing. Also, doing a FindWindowEx on Internet Explorer_Server also returned nothing.
All this and I still have to figure out how to get the text in the control to my application...
College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
Posts
4,495
Re: Internet Explorer_Server class window
Hmmm.. couldve sworn I tried that 10 times already, but copied your third line into mine for the hwndIEServer and it worked lol ... thx gonna work on the text part now...
College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
Posts
4,495
Re: Internet Explorer_Server class window
The code to get the text doesnt work.. i returns a zero value. The code I have so far is below, all the handles pull nonzerovalues. The SendMessage statements return 0.
College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
Posts
4,495
Re: Internet Explorer_Server class window
Im guessing the code won't work because it is some sort of HTML object. Anyone know how to pull text from the Internet Explorer_Server class window? The same class is used as the main window in Internet Explorer, so surely someone out there has done it.
The code all runs without errors, however the "objDoc = WindowDOM(hWndIEServer)" posted on the button click is a blank document, because the If statement isnt ran.
The SendMessageTimeout function call in the WindowDom function brings back a message of 0, which is where i think the holdup is. I can feel im getting real close... anyone know of something i can try??
College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
Posts
4,495
Re: Internet Explorer_Server class window
I sure did WingMan... my code was a little messy, but I did find some code on the net that utilizes an IEDom class, to get the http object. Have it in a project that returns the innertext of the document that is currently inside the Internet Explorer window.... gimme a few minutes and I'll post the code....
Rather... do you want the code to get the text out of Internet Explorer?? or in regards to Yahoo Instant Messenger, which also uses the Internet Explorer_Class window??
College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
Posts
4,495
Re: Internet Explorer_Server class window
Here's the code where you can get the information into a string from the class window hwnd.. its in an IEdom class and in a win32 functions class... to get the html into a string, you just call the following:
VB Code:
'hwndTmpGetIE is the handle to the Internet Explorer_Class window....
Dim i As IHTMLDocument = ieDom.IEDOMFromhWnd(hwndTmpGetIE)
And the two classes are attached below (the win32 functions class has more declarations that is actually used, its just a common class I use that I put my API functions in..)
**Note been a while since I used this code, and it might be a little messy because I was just first beginning when I wrote it...
Last edited by gigemboy; Jan 13th, 2006 at 12:39 PM.