Global hooks JAVA LINUX (Ubuntu)
I want to hook into another GUI app (probably using Qt). I want to know, when some button is ready to click and etc. My app technology is 开发者_如何学JAVAJAVA, my OS is Ubuntu.
Michal.
I can't help you with the button thing, but the most commom way of interacting with other desktop applications if there is no public API is using the Robot
class. With a Robot
you have control over the cursor (point&click) as well as keyboard input.
Javadoc java.awt.Robot
I don't know which application you want to hook into, but some expose data and methods via DBUS. It would be less costly.
I seriously doubt you can do this. Especially from java. Unless the app you're trying to control has some public API, or can be controlled with dbus.
This sounds like a job for some native hack via either X11 apis or something from Qt.
精彩评论