GetWindowText - what should it return for IE Window?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
MikeB941
Newbie
Posts: 17
Joined: Sat Jul 07, 2007 7:53 pm

GetWindowText - what should it return for IE Window?

Post by MikeB941 » Sun Jul 08, 2007 11:39 pm

Hello:

I was hoping to use GetWindowText to pull in all the text from an application up in an IE browser window. While GetWindowText works great when I point it to notepad, I don't get much (if anything) back from an IE browser window...

Is GetWindowText supposed to return all the visible (not graphic) text in an IE browser window?

Thanks for any help!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 09, 2007 5:40 am

No. GetWindowText will look at all objects exposed by a window and return any text exposed by those objects. If those objects don't expose text, you won't get anything. The text inside IE's WebBrowser control is not that kind of text - it is rendered graphics. The only way to retrieve text from a web page is to use WebRecorder or VBScript to drive IE's Document Object Model.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts