1

I'm fluent in java, and have messed with vb.net, but I prefer java. I wish to make a program that ++'s a variable everytime I click my mouse in a certain coordinate on my screen. Not sure how to record when a mouse click has happened outside of the program's forms.

  • 2
    This might help you [Java Robot](http://stackoverflow.com/questions/19185162/how-to-simulate-a-real-mouse-click-using-java) – SASIKUMAR S Jul 12 '15 at 03:23

1 Answers1

2

This can't be done in pure Java but people have written JNI libraries that can capture global mouse and keyboard events. Take a look at

https://github.com/kwhat/jnativehook

pvg
  • 2,651
  • 4
  • 15
  • 31