class SKryptonRobot : IRobot
A class representing a org.sikuli.script.IRobot that can be used to control a SKryptonScreen, not recommended for normal use as this is not thread safe, any actions generated will be unpredictable behaviour. It is recommended to use SKryptonKeyboard and SKryptonMouse as a thread safe wrapper to control this robot.
SKryptonRobot(screen: SKryptonScreen)
Main constructor |
val screen: SKryptonScreen
SKryptonScreen that is bound to this robot. |
fun captureScreen(screenRect: Rectangle): ScreenImage
Takes a screenshot of the screen bound to this robot |
|
fun cleanup(): Unit
Does nothing, ignore. |
|
fun clickEnds(): Unit
Does nothing, ignore. |
|
fun clickStarts(): Unit
Does nothing, ignore. |
|
fun delay(ms: Int): Unit
Sleeps the current thread for a duration |
|
fun getColorAt(x: Int, y: Int): Color
Gets the color of the pixel at coordinates. |
|
fun getScreen(): IScreen
Gets the bound screen instance. |
|
fun isRemote(): Boolean
Returns whether or not the robot is controlling a remote screen. Always true. |
|
fun keyDown(code: Int): Unit
Presses key with the given code. fun keyDown(keys: String): Unit
Presses keys specified in a string. |
|
fun keyUp(): Unit
Releases all keys. fun keyUp(code: Int): Unit
Releases key with the given code. fun keyUp(keys: String): Unit
Releases keys specified in a string |
|
fun mouseDown(buttons: Int): Unit
Presses mouse buttons. |
|
fun mouseMove(x: Int, y: Int): Unit
Moves the mouse to the coordinates instantly. |
|
fun mouseReset(): Unit
Resets the mouse state. Mouse is moved to (0, 0) and all buttons are released. |
|
fun mouseUp(buttons: Int): Int
Releases mouse buttons. |
|
fun mouseWheel(wheelAmt: Int): Unit
Spins the mouse wheel. |
|
fun pressModifiers(modifiers: Int): Unit
Presses key modifiers. |
|
fun releaseModifiers(modifiers: Int): Unit
Releases key modifiers. |
|
fun setAutoDelay(ms: Int): Unit
Sets the auto delay for this robot. |
|
fun smoothMove(dest: Location): Unit
Moves the mouse to the destination in a smooth fashion. fun smoothMove(src: Location, dest: Location, ms: Long): Unit
Moves the mouse from a source to the destination in a smooth fashion. |
|
fun typeChar(character: Char, mode: KeyMode): Unit
Types a given character. |
|
fun typeEnds(): Unit
Does nothing, ignore. |
|
fun typeKey(key: Int): Unit
Types a given key. |
|
fun typeStarts(): Unit
Does nothing, ignore. |
|
fun waitForIdle(): Unit
Does nothing, ignore. |