ford has asked for the wisdom of the Perl Monks concerning the following question:

Hi, While installing the module Prima iam getting error make: Fatal error: Command failed for target `unix/gtk.o'. Iam working on UNIX machine. Can anyone please help me.. Thanks and Regards Peter Arun.

Replies are listed 'Best First'.
Re: Perl Module
by deorth (Scribe) on Oct 15, 2007 at 09:53 UTC
    Hi Ford, Perhaps you can provide us with an example of the perl code you've already written in attempting to solve this problem ?

    It sounds like you're trying to extract text from An X or GTK window app in some way, but perhaps you can explain more about that, give a sample application name or something ?

    Basically, I want to help, but need more details to be able to start. Thanks

      Hi deorth, Actually it is a Java application and we have to click on specific areas of the window by identifying the text i.e we have to click on dates, numbers, etc. and also extract the text which is displayed on another area of the window. And this application is run on UNIX OS. I hope I have cleared your doubts. In case it is still not clear, please let me know. Thanks in advance. Ford.
Re: Perl Module
by perlfan (Parson) on Oct 16, 2007 at 00:10 UTC
    I found this in response to another node, and it has a blurb about getting text.

    Maybe you can capture an image and OCR it?
      hi, The application is a java application which runs on UNIX OS. The win32::guitest module that you are referring to does not install in UNIX platform. Can you suggest some other modules which works on UNIX?
Re: Perl Module
by dk (Chaplain) on Oct 16, 2007 at 08:11 UTC
    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.

      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.