I'm trying to move a Windows Explorer window using the AWT Robot. The robot is running in Java 7, and the OS is Windows 7.
I'm able to move the mouse and click on things, but when I try to click-and-drag, it doesn't seem to be pressing the button at all. I can't see what's wrong, or think of how to figure out what's happening.
I started out using Sikuli:
mouse.mouseDown(InputEvent.BUTTON1_MASK);
mouse.drop(targetLocation);
When that didn't work, I tried a lower-level implementation, working with the robot directly:
Robot robot = new Robot();
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseMove(targetLocation.getX(), targetLocation.getY());
robot.mouseRelease(InputEvent.BUTTON1_MASK);
The mouse starts in the correct place and moves to the correct destination, but doesn't seem to press the button.