LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Controlling a GUI application from a script (http://www.linuxquestions.org/questions/linux-software-2/controlling-a-gui-application-from-a-script-806965/)

helger 05-10-2010 11:11 AM

Controlling a GUI application from a script
 
Hi

I have the following problem. I have a linux binary for a GUI app. I don't have the source code for it and the author also refuses to make the source code available. The GUI app works like this

1) Open Image File
2) Click on a button to do some image processing
3) Save file

The problem is that I need to do this for > 1000 images... and the app can not be used from the command line. I know the GUI is based on QT. Is there a way to control a GUI applications from a script or other software? Where is a good place to start looking for a solution to this problem?

Regards,
Helge

MensaWater 05-10-2010 11:18 AM

Sounds like you need something like "expect" for a GUI.

In the Wikipedia page for Expect I see this quote:

Quote:

Expect cannot automate GUI based tools. This is generally only a problem on Windows where for many tasks a GUI based interface is the only option. In these situations tools like Autohotkey, AutoIt or Winbatch can be used instead.
I haven't used any of those but a quick perusal of the page for Autohotkey makes it sound like what you need and says it has a Linux version:
http://en.wikipedia.org/wiki/Autohotkey

There are links to the other two in the original article for Expect.

jefro 05-10-2010 04:15 PM

BeOS used to have one that works but not sure you can port it. I think it was called hey.

helger 05-18-2010 05:20 AM

Thanks. Ended up using xmacro.

i92guboj 05-18-2010 07:18 AM

I am not sure what kind of processing did you need, but next time using imagemagick or even the gimp command line interface could save you all the pain.

helger 05-18-2010 07:23 AM

Thanks i92guboj

I'll keep that in mind. However, the kind of processing I needed was not available in those packages.

i92guboj 05-18-2010 09:29 AM

Quote:

Originally Posted by helger (Post 3972639)
Thanks i92guboj

I'll keep that in mind. However, the kind of processing I needed was not available in those packages.

Out of curiosity, what was that?

helger 05-18-2010 09:35 AM

I need to perform tracking of facial features in a movie using Active Appearence Models. The binary tools works fine for training the models, but fails for a movie due to the one-image-at-a-time limitation of the GUI.

The tool is available here http://www.isbe.man.ac.uk/~bim/softw...doc/index.html.


All times are GMT -5. The time now is 11:46 AM.