[英]Screen reading / mouse clicking under Linux / X Window System?
I'm learning about AI and (just for fun and practice, not profit or anything evil) I'd like to write a little bot to play a rinky-dink Flash game for me. 我正在学习AI,并且(只是为了娱乐和练习,而不是牟取暴利或其他邪恶的东西),我想写一个小机器人来为我玩一个溜溜的Flash游戏。
As a Microsoft hater, I'm embarrassed to say that I know and have used the required function calls some time ago under Windows, programming in Delphi. 作为Microsoft的仇恨者,我很尴尬地说我早在Windows下在Delphi中编程时就已经知道并使用了必需的函数调用。 But these days I try to do everything under Linux and I don't seem to have any idea.
但是这些天我尝试在Linux下做所有事情,但似乎没有任何想法。
Requirements: 要求:
Ideally, I'd like to do this from a Clojure application running in the JVM, so a Java compatible library would be the cat's meow. 理想情况下,我想从JVM中运行的Clojure应用程序中执行此操作,因此Java兼容的库将是您的最佳选择。 But failing that, I could write myself a C program to mediate between X Window and my app via local TCP/IP.
否则,我可以编写一个C程序来通过本地TCP / IP在X Window和我的应用程序之间进行中介。
You can always rely upon the good old java.awt.Robot class, which, i think, has all the features you're asking : 您总是可以依赖旧的java.awt.Robot类,我认为它具有您要求的所有功能:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.