class SKryptonMouse
Class representing a virtual mouse for a com.waicool20.skrypton.sikulix.SKryptonScreen This class is also in charge of coordinating mouse actions between threads, unlike SKryptonRobot all functions are synchronized and thus only one thread may have access to keyboard actions.
SKryptonMouse(robot: SKryptonRobot)
Main constructor |
val robot: SKryptonRobot
SKryptonRobot used for generating actions. |
fun <T> atomicAction(action: () -> T): T
Executes an action atomically while keeping the synchronized lock to this object. Useful if you want to do multiple actions in one go without the possibility of a thread stealing ownership. |
|
fun click(location: Location, buttons: Int, modifiers: Int): Unit
Sends a click at a given location |
|
fun doubleClick(location: Location, buttons: Int, modifiers: Int): Unit
Sends a double click at a given location |
|
fun drag(location: Location, resetDelays: Boolean = true): Unit
Initiates a mouse drag action. (Moves mouse to a location and presses without releasing) |
|
fun dragDrop(loc1: Location, loc2: Location): Unit
Same as calling drag with loc1 then dropAt with loc2 but does this all at once while keeping the lock to this object. |
|
fun dropAt(location: Location, resetDelays: Boolean = true): Unit
Ends a mouse drop action. (Moves mouse to a location and releases the button) |
|
fun mouseDown(buttons: Int): Unit
Presses mouse buttons. |
|
fun mouseUp(buttons: Int = 0): Int
Releases mouse buttons. |
|
fun moveTo(location: Location): Unit
Moves the mouse cursor to a given location. |
|
fun spinWheel(location: Location?, direction: Int, steps: Int, stepDelay: Int): Unit
Spins the mouse wheel. |