Question

I currently have a simple application that needs to click on certain coordinates and it does so perfectly with Java robot when the computer is not being used.

However, when the user is moving around with the mouse, the algorithm sometimes fails and misses the coordinates. Is there any way to verify the mouseclick or lock physical mouse/keyboard input for couple of milliseconds until Java robot does its job?

Was it helpful?

Solution

As per Arne's request, I'll post my comment as an answer.

You can hook a mouse or keyboard with JNA, here's an example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top