Jump to content

Mouse teleport


volcom3d

Recommended Posts

 

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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