Click to See Complete Forum and Search --> : How to grab text from text-based apps/objects?!?!!? Solution = money!


tobfound
February 14th, 2003, 06:28 AM
Hi everybody,

I've asked this question before, and I'M NOW WILLING TO PAY (with PayPal) for a solution that fits my needs because time is not a thing I have in abundance and I need this thing quickly!

Here's, from a user point of view, what I want the resulting solution app to do:

####
When pressing a modifier key (ctrl for example), clicking (right or left mouse) ANY text-based string in ANY application or object (folder names, titles, list items, etc) in the operating system (win95+), a small window should appear next to the clicked-on text informing the user what text he/she has clicked on.
####

Two approaches (as far as I know) are possible: Either you can go the OCR (Optical Character Recognition) way where you actually capture and analyze what the screen pixels look like. An OCR engine is hard to develop yourself and expensive to license or buy. Or you can use the MS Accessibility API to do this... (fairly undocumented but supposed to do the trick). This is an API used for developing apps that for instance can read text on the screen out loud.

Anyone with the appropriate knowledge and skills who want to take this on?

We can discuss the details more privately when a first contact has been established. Thx everybody and thx for a great forum!

/Tommy

dimm_coder
February 14th, 2003, 06:44 AM
Read about windows hooks (SetWindowHookEx,...).
U can hook window message u need ( for ex. dbl left mouse clicking) for every window-based application with your injection dll. Then for every user dbl click the hook function in your dll will get it then U can with window handle of window where click was get this string ( first get info about this window, then if it is for ex. list, edit, etc... get selected text, in other case - caption of window, etc... get all window text , or all what U want ).
So look for windows hooks possibilities I 've mentioned above.

Good luck :)

tobfound
February 14th, 2003, 06:54 AM
Ok... I'll look into that!

The problem is that I don't have the development time to do it myself!

[My money-for-solution offer still remains]

/Tommy

bytekeeper
February 14th, 2003, 09:42 AM
It's possible, but only for standard windows controls
(eg. edit fields, listboxes, comboboxes, listviews, treeviews, checkboxes, buttons, window titles, etc.) and it is impossible (or very hard) with nonstandard (custom) objects.

I did something like this, but text was logged in
file.

How many time do you have?

FunnyButCocky
February 24th, 2003, 06:55 PM
Just a little clarification please. Are you displaying graphic files, such as bmp's and tif's and want to extract the text from the image? Or are they only clicking on standard windows?

Also, what do you want this app written in?

Assuming that you want it in Visual C++ and it is NOT grabbing text from graphics files, I could probably have it working for you in a day or so.

Terry

tobfound
February 26th, 2003, 06:51 AM
No exactly, no graphical or rendered text is required to be parsed... even though that would be the preferred solution. You don't happen to have an OCR-engine lying around?

I have received two solutions already but what I need really is to capture the word under te pointer, not the entire string in the pointed-to object... is this possible...? The two semi-working solutions I have now captures the entire text in the object.

/Tommy

galathaea
February 27th, 2003, 01:56 PM
I think the problem may be with the lack of any actual specification being posted here on what you want. First you mentioned text, and got two solutions, and now a mention of word. If you are serious about a solution, I would definitely suggest creating specifications that will not be modified after receiving solutions, as that will turn alot of potential help away. I am sure that the solutions you received so far could be modified to search through the text returned and, using the specification of the font(s) selected to the dc for the window that was clicked and its size, calculate which word appears at the clicked location. But I wouldn't write a solution for this, because I would now be afraid that the parsing specification I would think of (using, say, spaces and periods) would not return what you wanted if the word was "half-arsed" or "some.other.text.concatenation"...

tobfound
February 28th, 2003, 05:33 AM
Hi Galathaea,

The specification should be adequate enough. I said in my post that I would discuss the details later with the ones interested in helping me out, and when that contact was established I mentioned what was necessary.

But you're right... my last post relates really to what has been said between me and the two people interested; hard for others to grasp of course.

Thx,

/Tommy