Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to capture screen text from GUI Interface
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00966844
Message ID:
00968341
Views:
15
Hi Don,

There's a real challenge in your problem. So far I can see two possible situations.

(1) The text you want to read and recognize is inside a control, like TextBox or EditBox, and the running application is written on something that supports native windows controls (VFP does not). In this case you should obtain the handle for the window of this control and then try to get the text either through sending window messages or through some Windows API calls, like GetWindowLong, GetWindowText, InternalGetWindowText etc.

(2) The text is drawn on a window. Again you have to get the handle of this window, and then through this handle you get a bitmap of the whole window. The window should be completely visible, at least the part of it that contains the text.

OCR systems work with bitmaps. So you may pass this bitmap to an OCR system to be read and recognized. There's no Windows API for OCR -- afaik. So you have to get an OCR system anyway.

It's very likely, at least I'd expect it to be this way, that such systems these day support reading text directly from windows of running applications. They must have this functionality implemented.

There is no direct solution for this problem on my web site -- http://www.news2news.com. Only solutions for small parts of it exist: how to enumerate child windows, how to enumerate running applications, how to find a window by its caption, how to get the screenshot of a window etc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform