Re: program to run another program

From: Lee Sau Dan (danlee_at_informatik.uni-freiburg.de)
Date: 08/17/05


Date: 17 Aug 2005 07:54:29 +0800


>>>>> "Mike" == Mike Ballard <dont_w@nt_spam.org> writes:

    Mike> This is going to sound loopy but is there any program that
    Mike> can run and operate another program's GUI?

No, in general. GUI programs are meant to be "user" friendly, where
"user" != "programmer". Most GUIs are not designed with scriptability
in mind.

Yes, it is possible to write a program to similate mouse clicks and
mouse movements. The challenge is determining where and when and how
to click. You use your brain and the clever vision system to do that
when operating manually. Programmatically, you can't do that
reliably.

Now, you know why I like CLI more? Ease of scriptability!

Few GUI programs (such as GIMP, Emacs) are designed with scriptability
in mind. Sigh...

    Mike> I have a ton of jpgs from scans and have discovered that
    Mike> loading any into xv and resaving them the file sizes are
    Mike> (sometimes) reduced up to 90%. The problem is xv has no
    Mike> batch mode and I can't see manually loading/resaving every
    Mike> single scan.

The problem is not the problem itself, but the tool you're using.
It's not designed with scriptability in mind.

Why not use a scriptable program that can do what you want? GIMP can
be scripted to do that, provided that you're willing to learn its
Scheme dialect (Scheme is a dialect of LISP).

But why GUI when you're doing batch conversions? What's the point of
displaying those images WYSIWYGly when all you want is just to save
them back to disk immediately? Who is there to see the display?

So, ImageMagick is the tool that suits your needs. install it and
then "man convert" to find out how to use it. You can then write a
simple shell-script, or even 1-liner.

-- 
Lee Sau Dan                     §õ¦u´°                          ~{@nJX6X~}
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee


Relevant Pages

  • Re: assigning multiple ip addresses to NIC on bootupm, how?
    ... You were absolutely right Mike. ... The lesson I 've learned here is that I need to stop thinking that GUI ... tools provided in Redhat/Fedora to configure these configuration files ...
    (Fedora)
  • Re: DB Modell - Frage an Profis
    ... > Hallo Christoph, ... > so, nur ist die frage, in wie weit dann die entwicklung der GUI sich ... Hallo Mike, ...
    (microsoft.public.de.sqlserver)
  • Re: Why Use anything BUT C?
    ... "Alan Connor" wrote in message ... > Well this will work out well then, because I am not into the GUI at all. ... many feel that something like Perl is more suited to it. ... One step at a time, Mike, although there is no disputing the wholesomeness ...
    (comp.lang.c)
  • Re: Which flavour for the following usage..
    ... Mike wrote: ... I want to set it up on a local network to run small ... The GUI will work fine, ... updates from fedoralegacy.org (after you apply the updates from ...
    (alt.linux)
  • Re: Which flavour for the following usage..
    ... Mike wrote: ... I want to set it up on a local network to run small ... The GUI will work fine, ... updates from fedoralegacy.org (after you apply the updates from ...
    (alt.os.linux)