in reply to Perl Module

It really depends where the text you want to extract is located. If the text is in the window title, then you need to call XGetWMName and/or XGetProperty(NET_WM_NAME) ( the latter is available in X11::Protocol , possibly the former also).

If the text is in some selectable text areas, selecting these with mouse will get the text copied in the X clipboard, which can then be accessed again by X11 core calls (XConvertSelection/XGetWindowProperty). Note that X clipboard is more complicated than win32 clipboard because you also need to track X11 events.

Finally, if none of these, I don't know if there's any generic way to query text from arbitrary application, and your best bet would be indeed, as suggested, to use OCR. Take a look at OCR::Naive that does exactly this.

Replies are listed 'Best First'.
Re^2: Perl Module
by ford (Novice) on Oct 24, 2007 at 07:03 UTC
    Hi, Thanks for the reply. I have followed your instructions. to install OCR::Naive there is one dependency Prima. while iam installing Prima iam getting an error like make: Fatal error: Command failed for target `unix/gtk.o' This error iam coming across while running the make command. Can u please help me with this.. Thanks and Regards Ford.