Package rsb.internal.naturalmouse
Class RSBSystemCalls
java.lang.Object
rsb.internal.naturalmouse.RSBSystemCalls
- All Implemented Interfaces:
com.github.joonasvali.naturalmouse.api.SystemCalls
public class RSBSystemCalls
extends Object
implements com.github.joonasvali.naturalmouse.api.SystemCalls
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongvoidsetMousePosition(int x, int y) Moves the mouse to specified pixel using the provided Robot.voidsleep(long time)
-
Constructor Details
-
RSBSystemCalls
-
-
Method Details
-
currentTimeMillis
public long currentTimeMillis()- Specified by:
currentTimeMillisin interfacecom.github.joonasvali.naturalmouse.api.SystemCalls
-
sleep
- Specified by:
sleepin interfacecom.github.joonasvali.naturalmouse.api.SystemCalls- Throws:
InterruptedException
-
getScreenSize
- Specified by:
getScreenSizein interfacecom.github.joonasvali.naturalmouse.api.SystemCalls
-
setMousePosition
public void setMousePosition(int x, int y) Moves the mouse to specified pixel using the provided Robot.
It seems there is a certain delay, measurable in less than milliseconds, before the mouse actually ends up on the requested pixel when using a Robot class. this usually isn't a problem, but when we ask the mouse position right after this call, there's extremely low but real chance we get wrong information back. I didn't add sleep here as it would cause overhead to sleep always, even when we don't instantly use the mouse position, but just acknowledged the issue with this warning. (Use fast unrestricted loop of Robot movement and checking the position after every move to invoke the issue.)
- Specified by:
setMousePositionin interfacecom.github.joonasvali.naturalmouse.api.SystemCalls- Parameters:
x- the x-coordinatey- the y-coordinate
-