Hi,
I'm wondering if it would be possible to write a program that actually
performs a mouseclick on a given location.
So for instance, I want to perform a mouseclick on my screen (thus on
the program that is currently fills the screen) on position 200,200.
Note that it's not clicking in the java program window, but it should
work anywhere on the screen, the same as actually clicking with the
mouse yourself.
Anyone have an idea?
Thanks
JScoobyCed - 06 Jun 2006 13:03 GMT
> Hi,
>
[quoted text clipped - 11 lines]
>
> Thanks
<code>
import javax.awt.Robot;
public class RobotTest {
public static void main(String[] arg) {
Robot robot = new Robot();
robot.mouseMove(200,200);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
}
}
</code>

Signature
JSC