Пример #1
0
 public MouseController() throws AWTException {
   // auto delay after each events
   robot.setAutoDelay(40);
   robot.setAutoWaitForIdle(true);
   robot.delay(5000);
   this.drawSomething();
   this.drawCercle(new Point(846, 467), new Point(992, 603));
   this.drawCercle(new Point(100, 100), new Point(300, 300));
   this.drawCercle(new Point(500, 500), new Point(900, 200));
 }
  public void ClickingLogic(int Ammount, int delay) {
    robot.mouseMove(var_coordX, var_coordY);
    robot.setAutoDelay(40);
    robot.setAutoWaitForIdle(true);

    for (int i = 0; i < Ammount; i++) {
      // robot.mouseMove(var_coordX,var_coordY); to include or not to include
      robot.delay(delay);
      robot.mousePress(InputEvent.BUTTON1_MASK);
      robot.mouseRelease(InputEvent.BUTTON1_MASK);
      var_ammount++;
      scene_ClickCount.setText(String.valueOf(var_ammount));
    }
  }
Пример #3
0
  MovableMouse() throws AWTException {
    this.robot = new Robot();

    robot.setAutoWaitForIdle(true);
    robot.setAutoDelay(autoDelay);
  }