Carl Smotricz
Carl Smotricz

Reputation: 67790

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.

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. But these days I try to do everything under Linux and I don't seem to have any idea.

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. But failing that, I could write myself a C program to mediate between X Window and my app via local TCP/IP.

Upvotes: 2

Views: 1493

Answers (1)

Riduidel
Riduidel

Reputation: 22300

You can always rely upon the good old java.awt.Robot class, which, i think, has all the features you're asking :

  • moving mouse
  • capturing a Rectangle on screen
  • clicking mouse

Upvotes: 5

Related Questions