0

I recently created an autoclicker, however it had a very large downside. Once activated, there was no way to make it not click certain things, or stop it without literally hitting the stop button on eclipse.
I was trying to figure out a way to:

  • Press a key or click a mouse to stop the program(while on another window)
  • Only click when a certain application has the focus of the screen Are any of these possible?
Stoud
  • 283
  • 1
  • 7
  • 15

1 Answers1

0

Yes. If you leave the natural habitat of the JVM and do some JNI magic, as described here and here

Community
  • 1
  • 1
JayC667
  • 2,418
  • 2
  • 17
  • 31
  • I was trying to stay in something that could be done in a java program. – Stoud Apr 29 '16 at 00:41
  • You could use the libraries in those posts. This way you'll write pure Java code, but the libraries do the JNI magic for you. – JayC667 Apr 29 '16 at 09:39