Jump to content

Mouse teleport


Recommended Posts

Posted

 

On 6/7/2016 at 11:49 AM, Explv said:

 

No, this feature was removed.

 

If you need to move the mouse instantly then you can use:


final void moveMouseInstantly(final MouseDestination mouseDestination) {
    Rectangle boundingBox = mouseDestination.getBoundingBox();
    moveMouseInstantly(random((int) boundingBox.getMinX(), (int) boundingBox.getMaxX()), random((int) boundingBox.getMinY(), (int) boundingBox.getMaxY()));
}

final void moveMouseInstantly(final int x, final int y) {
    getBot().getMouseEventHandler().generateBotMouseEvent(MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, x, y, 0, false, MouseEvent.NOBUTTON, true);
}

And I'm sure if you spent some time making your own MouseEvent then you could have it at whatever speed you want. However, the setMouseSpeed feature was removed for a reason.

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...