[PyKDE] posting messages to another application

David Boddie david at boddie.org.uk
Thu Aug 10 22:35:47 BST 2006


On Mon, 31 Jul 2006 20:35:18 -0700, Tom Brown wrote:

> I am using PyQt4. I would like to post keyboard messages to another
> application to control it programmatically. In my old windows days, I
> would somehow (don't remember how exactly) get a hold of the list of
> applications, cycle through them until I found the one I wanted, then
> got an app/window handle I could use to post messages to the other app.

I imagine that this was with COM.

> At least, something to that effect. I would like to do something
> similar in X windows. Does Qt4 support this? I'm thinking there must be
> a way to do this, I just don't know where to start looking. Can someone
> please point me to some documentation?

Unfortunately, different X Windows-based desktop environments on Linux use
different systems for inter-process communication. KDE 3 uses DCOP, GNOME's
system is based on CORBA, and KDE 4 looks like it will be based on D-BUS.

This obviously makes things difficult, to say the least. One option would
appear to be to wait for PyQt4 to be updated after Qt 4.2 is released or use
existing bindings for D-BUS. Of course, this won't help you with existing
desktop environments. :-(

David




More information about the PyQt mailing list