Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

simulate mouse click java

import java.awt.event.*;
import java.awt.Robot;
public class test {
 public static void main(String args[]) {
  Robot bot = null;
  try {
   bot = new Robot();
  } catch (Exception failed) {
   System.err.println("Failed instantiating Robot: " + failed);
  }
  int mask = InputEvent.BUTTON1_DOWN_MASK;
  bot.mouseMove(100, 100);
  bot.mousePress(mask);
  bot.mouseRelease(mask);
 }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #simulate #mouse #click #java
ADD COMMENT
Topic
Name
8+3 =