Package rsb.internal
Class InputManager
java.lang.Object
rsb.internal.InputManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clickMouse
(boolean left) Click the mouse at the current position.void
dragMouse
(int x, int y) Drag the mouse from the current position to a certain other position.int
getX()
int
getY()
void
holdKey
(int keyCode, int ms) void
hopMouse
(int x, int y) void
moveMouse
(int x, int y, int randomX, int randomY) void
moveMouse
(int speed, int x, int y, int randomX, int randomY) Moves the mouse to the specified point at a certain sped.void
pressKey
(char ch) int
random
(int min, int max) void
releaseKey
(char ch) void
sendKey
(char c) void
void
void
void
sendKeysInstant
(String text, boolean pressEnter) void
sleepNoException
(long t) void
windMouse
(int x, int y) void
windMouse
(int curX, int curY, int targetX, int targetY) Moves the mouse from a certain point to another at the default speed.void
windMouse
(int speed, int curX, int curY, int targetX, int targetY) Deprecated.
-
Constructor Details
-
InputManager
-
-
Method Details
-
clickMouse
public void clickMouse(boolean left) Click the mouse at the current position.- Parameters:
left
- whether to click the left mouse button or not
-
dragMouse
public void dragMouse(int x, int y) Drag the mouse from the current position to a certain other position.- Parameters:
x
- the x coordinate to drag toy
- the y coordinate to drag to
-
getX
public int getX() -
getY
public int getY() -
holdKey
public void holdKey(int keyCode, int ms) -
hopMouse
public void hopMouse(int x, int y) -
moveMouse
public void moveMouse(int x, int y, int randomX, int randomY) - Parameters:
x
- the x valuey
- the y valuerandomX
- x-axis randomness (added to x)randomY
- y-axis randomness (added to y)
-
moveMouse
public void moveMouse(int speed, int x, int y, int randomX, int randomY) Moves the mouse to the specified point at a certain sped.- Parameters:
speed
- the lower, the faster.x
- the x valuey
- the y valuerandomX
- x-axis randomness (added to x)randomY
- y-axis randomness (added to y)
-
pressKey
public void pressKey(char ch) -
random
public int random(int min, int max) -
releaseKey
public void releaseKey(char ch) -
sendKey
public void sendKey(char c) -
sendKeys
-
sendKeys
-
sendKeys
-
sendKeysInstant
-
sleepNoException
public void sleepNoException(long t) -
windMouse
public void windMouse(int curX, int curY, int targetX, int targetY) Moves the mouse from a certain point to another at the default speed.- Parameters:
curX
- the x value to move fromcurY
- the y value to move fromtargetX
- the x value to move totargetY
- the y value to move to- See Also:
-
windMouse
Deprecated.Moves the mouse from a certain point to another, with specified speed.- Parameters:
speed
- the lower, the faster.curX
- the x value to move fromcurY
- the y value to move fromtargetX
- the x value to move totargetY
- the y value to move to
-
windMouse
public void windMouse(int x, int y)
-