Example #1
0
 public static void drag(int x, int y) {
   Component mouseTarget = Data.CLIENT_APPLET.getComponent(0);
   Component mouseMotionTarget = mouseTarget;
   MouseEvent[] me =
       createDragPath(
           mouseMotionTarget, mouseTarget, MousePathGenerator.generatePath(x, y), LEFT_BUTTON);
   isPressed = true;
   for (int i = 0; i < me.length; ++i) {
     Client.getMouse().sendEvent(me[i]);
     sleep(Math.max(0, mouseSpeed - 2 + new Random().nextInt(4)));
   }
   isPressed = false;
 }
Example #2
0
 public static Component getTarget() {
   return Data.CLIENT_APPLET.getComponent(0);
 }