interface ISikuliRegion
Interfaces that copies most of the Region APIs Mainly used for allowing easy delegation of SKryptonMatch functions to SKryptonRegion. See here for more information.
abstract fun above(): SKryptonRegion
Gets the region above the top side with same width, the new region extends to the top screen border. abstract fun above(height: Int): SKryptonRegion
Gets the region above the top side with same width, the new region extends by |
|
abstract fun below(): SKryptonRegion
Gets the region below the bottom side with same width, the new region extends to the bottom screen border. abstract fun below(height: Int): SKryptonRegion
Gets the region below the bottom side with same width, the new region extends by |
|
abstract fun click(): Int
Left click at the region's last successful match, uses center if there is no last match. If region is a match, click targetOffset. abstract fun <PFRML : Any> click(target: PFRML): Int
Attempts to find the target and click it. abstract fun <PFRML : Any> click(target: PFRML, modifiers: Int): Int
Attempts to find the target and click it with modifiers. |
|
abstract operator fun compareTo(region: Region): Int
Compares the regions in terms of area. |
|
abstract fun doubleClick(): Int abstract fun <PFRML : Any> doubleClick(target: PFRML): Int abstract fun <PFRML : Any> doubleClick(target: PFRML, modifiers: Int): Int
Like click but double that. |
|
abstract fun <PFRML : Any> drag(target: PFRML): Int
Initiates a mouse drag action. (Moves mouse to a location and presses without releasing) |
|
abstract fun <PFRML : Any> dragDrop(target: PFRML): Int
Drags from region's last match and drop at given target using left mouse button. abstract fun <PFRML : Any> dragDrop(t1: PFRML, t2: PFRML): Int
Drag from a position and drop to another using left mouse button. |
|
abstract fun <PFRML : Any> dropAt(target: PFRML): Int
Ends a mouse drop action. (Moves mouse to a location and releases the button) |
|
abstract fun <PSI : Any> exists(target: PSI): SKryptonMatch? abstract fun <PSI : Any> exists(target: PSI, timeout: Double): SKryptonMatch?
Check if target exists (with the default autoWaitTimeout) |
|
abstract fun <PSI : Any> find(target: PSI): SKryptonMatch
Finds the given target in the region and returns the best match. If AutoWaitTimeout is set, this is equivalent to wait(). Otherwise only one search attempt will be done. |
|
abstract fun <PSI : Any> findAll(target: PSI): Iterator<SKryptonMatch>
Finds all occurrences of the given target in the region and returns an Iterator of SKryptonMatch. |
|
abstract fun getBottomLeft(): Location
Gets the bottom left location of the region. |
|
abstract fun getBottomRight(): Location
Gets the bottom right location of the region. |
|
abstract fun getCenter(): Location
Gets the center of the region. |
|
abstract fun getLastMatch(): SKryptonMatch?
Gets the last match matched in this region. |
|
abstract fun getLastMatches(): Iterator<SKryptonMatch>
Gets last matches matched in this region. |
|
abstract fun <PSIMRL : Any> getLocationFromTarget(target: PSIMRL): Location
Gets the Location of the target. |
|
abstract fun getTopLeft(): Location
Gets the top left location of the region. |
|
abstract fun getTopRight(): Location
Gets the top right location of the region. |
|
abstract fun grow(l: Int, r: Int, t: Int, b: Int): SKryptonRegion abstract fun grow(w: Int, h: Int): SKryptonRegion abstract fun grow(range: Int): SKryptonRegion
Creates a region grown to the given values in pixels. Negative values can be passed to shrink instead. abstract fun grow(): SKryptonRegion
Creates a region grown in pixels specified by org.sikuli.basics.Settings.DefaultPadding. |
|
abstract fun highlight(): SKryptonRegion
Highlights the region. abstract fun highlight(color: String): SKryptonRegion
Highlights the region with the given color abstract fun highlight(secs: Int): SKryptonRegion abstract fun highlight(secs: Float): SKryptonRegion
Highlights the region for the given duration. abstract fun highlight(secs: Int, color: String): SKryptonRegion abstract fun highlight(secs: Float, color: String): SKryptonRegion
Highlights the region for the given duration and color. |
|
abstract fun hover(): Int
Move the mouse pointer to region's last successful match, uses center if no last match. If region is a match, move to targetOffset. Same as mouseMove. abstract fun <PFRML : Any> hover(target: PFRML): Int
Attempts to find the target and move the mouse pointer to it. |
|
abstract fun intersection(region: Region): SKryptonRegion
Creates a region that is the intersection of the given regions. |
|
abstract fun keyDown(keycode: Int): Unit
Presses a specific key. abstract fun keyDown(keys: String): Unit
Presses the keys specified by the string. |
|
abstract fun keyUp(): Unit
Releases all keys abstract fun keyUp(keycode: Int): Unit
Releases a specific key. abstract fun keyUp(keys: String): Unit
Releases the keys specified by the string. |
|
abstract fun left(): SKryptonRegion
Gets the region left to the left side with same height, the new region extends to the left screen border. abstract fun left(width: Int): SKryptonRegion
Gets the region left to the left side with same height, the new region extends by |
|
abstract fun mouseDown(buttons: Int): Unit
Presses mouse buttons. |
|
abstract fun mouseMove(): Int
Moves the mouse pointer to the region's last successful match. Same as hover. abstract fun mouseMove(xoff: Int, yoff: Int): Int
Moves the mouse from the current position to the offset position. abstract fun <PFRML : Any> mouseMove(target: PFRML): Int
Moves the mouse to the given target. |
|
abstract fun mouseUp(): Unit
Releases all mouse buttons. abstract fun mouseUp(buttons: Int): Unit
Releases mouse buttons. |
|
abstract fun offset(loc: Location): SKryptonRegion
Returns a new Region object, whose upper left corner is relocated adding the location’s x and y value to the respective values of the given region. Width and height are the same. So this clones a region at a different place. |
|
abstract fun paste(text: String): Int
Pastes the given text into the current caret position. abstract fun <PFRML : Any> paste(target: PFRML, text: String): Int
Pastes the given text into the target. |
|
abstract operator fun plus(region: Region): SKryptonRegion
Same as union. |
|
abstract fun right(): SKryptonRegion
Gets the region right to the right side with same height, the new region extends to the right screen border. abstract fun right(width: Int): SKryptonRegion
Gets the region right to the right side with same height, the new region extends by |
|
abstract fun rightClick(): Int abstract fun <PFRML : Any> rightClick(target: PFRML): Int abstract fun <PFRML : Any> rightClick(target: PFRML, modifiers: Int): Int
Like click but uses right mouse button instead. |
|
abstract fun setLocation(loc: Location): SKryptonRegion
Set location of this region. |
|
abstract fun setROI(): Unit abstract fun setROI(rect: Rectangle): Unit abstract fun setROI(region: Region): Unit abstract fun setROI(X: Int, Y: Int, W: Int, H: Int): Unit
Sets the Region of Interest, mainly used to speed up searches. |
|
abstract fun type(text: String): Int abstract fun type(text: String, modifiers: String): Int abstract fun type(text: String, modifiers: Int): Int
Types the given text into the current caret position. Only ASCII characters are supported. abstract fun <PFRML : Any> type(target: PFRML, text: String): Int abstract fun <PFRML : Any> type(target: PFRML, text: String, modifiers: String): Int abstract fun <PFRML : Any> type(target: PFRML, text: String, modifiers: Int): Int
Types the given text into the target. Only ASCII characters are supported. |
|
abstract fun union(region: Region): SKryptonRegion
Creates a new region containing both regions. |
|
abstract fun <PSI : Any> wait(target: PSI): SKryptonMatch
Waits for the target to appear until the AutoWaitTimeout value is exceeded. abstract fun <PSI : Any> wait(target: PSI, timeout: Double): SKryptonMatch
Waits for the target to appear or timeout (in second) is passed. |
|
abstract fun wheel(direction: Int, steps: Int): Int
Spins the mouse wheel. abstract fun <PFRML : Any> wheel(target: PFRML, direction: Int, steps: Int): Int abstract fun <PFRML : Any> wheel(target: PFRML, direction: Int, steps: Int, stepDelay: Int): Int
Spins the mouse wheel at the given target |
class SKryptonMatch : Match, ISikuliRegion
A class subclassing Match, it is identical for the most part but allows the use of independent mouse and keyboard actions. |
|
open class SKryptonRegion : Region, ISikuliRegion
A class subclassing Region, it is identical for the most part but allows the use of independent mouse and keyboard actions. |