Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GUI Scripting

0 views
Skip to first unread message

Santanu Chatterjee

unread,
May 28, 2002, 11:41:29 PM5/28/02
to
Hello everybody,

I was wondering if Linux window managers could do this for me.
This would be great.

There is a thing called `macro' in OpenOffice, MS Office, etc.
that allows one to record a series of mouse clicks to a single
button. It would be nice to have a similar feature system wide
(in GUI, of course) in Linux. Such things, in the form of shell
scripting already exist for the command line interface. What I am
looking or is a similar feature for the GUI, maybe `GUI
scripting' if that term makes sense.

For example, everday, in GUI, I click open kppp and connect to
internet, then open Sylpheed and click on Get Mail button to
download mail, etc. I want to have these things automatically
done for me. Bash can open up the apps for me but surely it
cannot click on the `Get Mail' button of Sylpheed.

Does anyone know whether such a thing is available in Linux.

Best Regards,
Santanu Chatterjee,
san...@softhome.net

Daniel Rees

unread,
May 29, 2002, 4:09:54 AM5/29/02
to
On Wed, 29 May 2002 04:41:29 +0100, Santanu Chatterjee wrote:

> For example, everday, in GUI, I click open kppp and connect to internet,
> then open Sylpheed and click on Get Mail button to download mail, etc. I
> want to have these things automatically done for me. Bash can open up
> the apps for me but surely it cannot click on the `Get Mail' button of
> Sylpheed.
>
> Does anyone know whether such a thing is available in Linux.

Well some mail user agents can do that - indeed if you start kmail as
"kmail --check" it will check for mail upon startup. kppp can also connect
via the command line by using "kppp -c <account>".

What you want to do could be achieved through a bash script in KDE's
".kde/Autostart" directory if sylpheed offered similar features to kmail.
I'm not sure if it does or not, but if not it's worth suggesting such a
feature to the developers.

It's always worth doing a "command --help" or "man command" to find these
extra little features. :)

--
Daniel Rees
* remove "spamguard" from email address upon reply

Santanu Chatterjee

unread,
May 29, 2002, 4:52:50 AM5/29/02
to
In article <pan.2002.05.29.09...@spamguard.dwrees.co.uk>,
"Daniel Rees" <d...@spamguard.dwrees.co.uk> wrote:

> Well some mail user agents can do that - indeed if you start kmail as
> "kmail --check" it will check for mail upon startup. kppp can also
> connect via the command line by using "kppp -c <account>".
>
> What you want to do could be achieved through a bash script in KDE's
> ".kde/Autostart" directory if sylpheed offered similar features to
> kmail. I'm not sure if it does or not, but if not it's worth suggesting
> such a feature to the developers.

Perhaps I could explain my point clearly.
I know that kppp and sylpheed have options to do what
I want. But I wanted some program to be able to record my
mouse movements and mouse clicks and replay them later in
order to accomplish the tasks recorded.Got my point?

Best Regards,
Santanu Chatterjee
san...@softhome.net

Rolf Magnus

unread,
May 29, 2002, 8:45:19 AM5/29/02
to
Your charset seems to be broken:

Content-Type: text/plain; charset=iso885915

Daniel Rees wrote:

>> Does anyone know whether such a thing is available in Linux.
>
> Well some mail user agents can do that - indeed if you start kmail as
> "kmail --check" it will check for mail upon startup. kppp can also connect
> via the command line by using "kppp -c <account>".
>
> What you want to do could be achieved through a bash script in KDE's
> ".kde/Autostart" directory if sylpheed offered similar features to kmail.
> I'm not sure if it does or not, but if not it's worth suggesting such a
> feature to the developers.

Another way for GUI scripting is to use dcop, but this will only work for
dcop-enabled apps (i.e. KDE apps). Use kdcop to browse through the
interfaces and the command line tool dcop to call them from shell scripts.

HTH

cryptopia

unread,
May 29, 2002, 8:40:27 AM5/29/02
to
Santanu Chatterjee wrote:
> Perhaps I could explain my point clearly.
> I know that kppp and sylpheed have options to do what
> I want. But I wanted some program to be able to record my
> mouse movements and mouse clicks and replay them later in
> order to accomplish the tasks recorded.Got my point?

What you are describing sounds like the old windows recorder app.
I didn't know it was still around.

To get to the "point" --
I have never seen or heard of a similar app in X and/or KDE
(or Gnome as far as that goes). Sorry about that.

Daniel Rees' suggestion about the bash script was a good one.
It isn't hard to learn and can be quite addictive. I would also
think that the scripts would also be easier to edit and tweak
than the macros.

Arne Schmitz

unread,
May 29, 2002, 9:25:29 AM5/29/02
to
Santanu Chatterjee schrieb:

> But I wanted some program to be able to record my
> mouse movements and mouse clicks and replay them later in
> order to accomplish the tasks recorded.

Why would someone want to do that? Is there an application that you really
need, which hasn't got DCOP support or the appropriate command-line flags
to do some task automatization? Maybe you could explain you problem a
little more specific and we can come up with some alternative idea.

Arne

--
If you explain so clearly that nobody can misunderstand, somebody
will.

[--- PGP key available on http://www.root42.de/ ---]

Daniel Rees

unread,
May 29, 2002, 6:43:25 PM5/29/02
to
On Wed, 29 May 2002 13:45:19 +0100, Rolf Magnus wrote:

> Your charset seems to be broken:
>
> Content-Type: text/plain; charset=iso885915

Thanks for the heads-up - Red Hat seemed to set a weird default charset
in pan.

For anyone else with the same problem, it's fixed by exporting
LC_ALL=ISO-8859-15 (or some other valid charset).

Santanu Chatterjee

unread,
May 30, 2002, 5:19:14 AM5/30/02
to
In article <ad2krg$8o6$1...@nets3.rz.RWTH-Aachen.DE>, "Arne Schmitz"
<arne.schm...@mmweg.rwth-aachen.de> wrote:

> Why would someone want to do that? Is there an application that you
> really need, which hasn't got DCOP support or the appropriate
> command-line flags to do some task automatization? Maybe you could
> explain you problem a little more specific and we can come up with some
> alternative idea.

Actually, I don't know why someone would want that!
Few days ago, a friend of mine asked me if such kind
of scripting (i.e. recording mouse click actions and
playing it later,etc.) was possible using the GUIs
in Linux.(He is a MS Word expert and very fond of macros).
I thought that being able to do this could be interesting
since this would give more flexible control of what I wanted
to do with GUI apps automatically, since all GUI apps do not have
elaborate and exhaustive command line options. I thought
it would be a good thing to ask in the KDE newsgroup
since this is one of the most popular graphical environment
in Linux.

Rolf Magnus wrote that
"Another way for GUI scripting is to use dcop..."

As for DCOP, can you tell me what it really is?
It would be nice if you could give some exact links which
would provide more info about this (/usr/share/doc files
do not seem to contain much info, neither does KHelpCenter)
(I am not on KDE,so I do not generally use KDE apps because
they take a long time to start elsewhere (I am on Fluxbox+ROX).
Perhaps that is why I did not know about DCOP.)

Kevin Krammer

unread,
May 30, 2002, 5:36:54 AM5/30/02
to
Santanu Chatterjee wrote:

> Actually, I don't know why someone would want that!
> Few days ago, a friend of mine asked me if such kind
> of scripting (i.e. recording mouse click actions and
> playing it later,etc.) was possible using the GUIs
> in Linux.(He is a MS Word expert and very fond of macros).

As far as I know does Word not record the mouse moves but the actions
triggered by the user.

Recording mouse movements and button clicks is far too error prone,
because the situation will not very likely be the same when the macro
is executed.

For example, if you record a servies of clicks on the desktop where you
have your mail program started and you execute the macro whiy ou have
switched to another desktop, it might do "something completely
different (tm)".

> I thought that being able to do this could be interesting
> since this would give more flexible control of what I wanted
> to do with GUI apps automatically, since all GUI apps do not have
> elaborate and exhaustive command line options. I thought
> it would be a good thing to ask in the KDE newsgroup
> since this is one of the most popular graphical environment
> in Linux.

That's why the KDE developers invented DCOP.
To communicate with running applications.

> As for DCOP, can you tell me what it really is?
> It would be nice if you could give some exact links which
> would provide more info about this (/usr/share/doc files
> do not seem to contain much info, neither does KHelpCenter)

http://www.volny.cz/bwian/dcop.html

That's a short introduction to DCOP scripting by Ladislav Strojil.

Basically DCOP allows an application to make its internal functions
available to other apps and one of these other apps is a shell DCOP
client.

For other scripting languages like Python there exist even direct DCOP
bindings, which provide the same level of functionality another KDE app
would have.

Cheers,
Kevin

--
Kevin Krammer <voy...@sbox.tu-graz.ac.at>
Student at Graz University of Technology
http://www.sbox.tu-graz.ac.at/home/v/voyager

Santanu Chatterjee

unread,
May 30, 2002, 11:02:56 PM5/30/02
to
In article <ad4rrk$c41$1...@fstgss02.tu-graz.ac.at>, "Kevin Krammer"
<voy...@sbox.tugraz.at> wrote:


> Recording mouse movements and button clicks is far too error prone,
> because the situation will not very likely be the same when the macro is
> executed.
> For example, if you record a servies of clicks on the desktop where you
> have your mail program started and you execute the macro whiy ou have
> switched to another desktop, it might do "something completely different
> (tm)".

Yes.I get the picture

> http://www.volny.cz/bwian/dcop.html
> That's a short introduction to DCOP scripting by Ladislav Strojil.

Thanks for the link. I will look there.



> Basically DCOP allows an application to make its internal functions
> available to other apps and one of these other apps is a shell DCOP
> client.
>
> For other scripting languages like Python there exist even direct DCOP
> bindings, which provide the same level of functionality another KDE app
> would have.

If Python can be used, then I ought to take a look.
I thought KDE programming was a C++ thing, which I don't know.

0 new messages