user757362
user757362

Reputation: 23

Control other app over gui from my program

I would like to write a simple C++ program for Linux (Ubuntu) to control other GUI programs. For example, to be able to read text labels and put text into entry boxes of other programs written using gtkmm. I have looked at X11 but I don't seem to find any relevant information or examples.

Thank you very much for any information.

Upvotes: 2

Views: 526

Answers (2)

user405725
user405725

Reputation:

There is a Java Robot class that was designed for this purpose. It can generate mouse & keyboard events etcetera. There is a good documentation and a lot of examples. For example - Introduction to the Java Robot class in Java. Unfortunately, it is Java. You can use X11 API directly, but that is usually too hard.

Upvotes: 0

Mat
Mat

Reputation: 206659

One way of doing it is via the XTEST (pdf) extension.

An example usage for key events is here: X11 Fake Key Event Generation using XTest Extension.

Upvotes: 3

Related Questions