[PyKDE] posting messages to another application

Tom Brown tom at nextstate.net
Mon Aug 14 06:51:30 BST 2006


On Thursday 10 August 2006 14:35, David Boddie wrote:
> 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.

No. But I was misleading. I realize now that I didn't get a list of 
windows, but got the actual window I wanted with a single call to the 
Windows API FindWindow().

> > 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. :-(

Sounds like I need to put this aside for awhile or for good. I did find 
some code that used the X API to accomplish the same thing. However, 
what do I want to do that for? ;)

Anyways, thanks for the pointers,
Tom




More information about the PyQt mailing list