Package | Description |
---|---|
org.sikuli.script | |
org.sikuli.script.compare | |
org.sikuli.util |
Modifier and Type | Class and Description |
---|---|
class |
Match
holds the result of a find operation, is itself the region on the screen,
where the image was found and hence inherits all methods from
Region . |
class |
Screen
A screen represents a physical monitor with its coordinates and size according to the global
point system: the screen areas are grouped around a point (0,0) like in a cartesian system (the
top left corner and the points contained in the screen area might have negative x and/or y values)
The screens are arranged in an array (index = id) and each screen is always the same object (not possible to create new objects). |
class |
ScreenUnion
CANDIDATE FOR DEPRECATION
INTERNAL USE
An extension of DesktopScreen, that uses all active monitors as one big screen
TO BE EVALUATED: is this really needed?
|
Modifier and Type | Method and Description |
---|---|
Region |
Region.above()
create a region above the top side with same width
the new region extends to the top screen border use grow() to include the current region |
Region |
Region.above(int height)
create a region above the top side with same width and given height
negative height creates the top part with height inside the region use grow() to include the current region |
Region |
Region.add(int l,
int r,
int t,
int b)
resize the region using the given padding values
might be negative |
Region |
Region.add(Location loc)
extend the region, so it contains the given point
but only the part inside the current screen |
Region |
Region.add(Region r)
extend the region, so it contains the given region
but only the part inside the current screen |
Region |
Region.below()
create a region below the bottom side with same width
the new region extends to the bottom screen border use grow() to include the current region |
Region |
Region.below(int height)
create a region below the bottom side with same width and given height
negative height creates the bottom part with height inside the region use grow() to include the current region |
Region |
Region.copyTo(int scrID)
new region with same offset to current screen's top left on given screen
|
Region |
Region.copyTo(IScreen screen)
new region with same offset to current screen's top left on given screen
|
static Region |
Region.create(int X,
int Y,
int W,
int H)
Create a region with the provided top left corner and size
|
static Region |
Region.create(Location loc,
int w,
int h)
Create a region with the provided top left corner and size
|
static Region |
Region.create(Location loc,
int create_x_direction,
int create_y_direction,
int w,
int h)
create a region with a corner at the given point
as specified with x y 0 0 top left 0 1 bottom left 1 0 top right 1 1 bottom right |
static Region |
Region.create(Rectangle r)
Create a region from a Rectangle
|
static Region |
Region.create(Region r)
Create a region from another region
including the region's settings |
static Region |
App.focusedWindow()
evaluates the region currently occupied by the systemwide frontmost window (usually the one that has focus for
mouse and keyboard actions)
|
Region |
Region.get(int part)
select the specified part of the region.
|
Region |
Region.getCell(int r,
int c)
get the specified cell counting from (0, 0), if a raster is setup
negative counts reverse from the end (last = -1) values outside range are 0 or last respectively |
Region |
Region.getCol(int c)
get the specified column counting from 0, if columns or raster are setup negative counts reverse from the end (last
= -1) values outside range are 0 or last respectively
|
Region |
Region.getCol(int c,
int n)
divide the region in n columns and select column c as new Region
|
Region |
ScreenUnion.getRegion() |
Region |
ObserveEvent.getRegion() |
Region |
ScreenImage.getRegion() |
Region |
Region.getROI()
A function only for backward compatibility - Only makes sense with Screen objects
|
Region |
Region.getRow(int r)
get the specified row counting from 0, if rows or raster are setup negative counts reverse from the end (last = -1)
values outside range are 0 or last respectively
|
Region |
Region.getRow(int r,
int n) |
Region |
Region.grow()
create a region enlarged n pixels on each side (n = Settings.DefaultPadding = 50 default)
|
Region |
Location.grow(int wh)
create a region with this point as center and the given size
|
Region |
Region.grow(int range)
create a region enlarged range pixels on each side
|
Region |
Location.grow(int w,
int h)
create a region with this point as center and the given size
|
Region |
Region.grow(int w,
int h)
create a region enlarged w pixels on left and right side and h pixels at top and bottom
|
Region |
Location.grow(int CREATE_X_DIRECTION,
int CREATE_Y_DIRECTION,
int w,
int h)
create a region with a corner at this point
as specified with x y 0 0 top left 0 1 bottom left 1 0 top right 1 1 bottom right |
Region |
Region.grow(int l,
int r,
int t,
int b)
create a region enlarged l pixels on left and r pixels right side and t pixels at top side and b pixels a bottom
side.
|
static Region |
Region.grow(Location loc)
create a minimal region at given point with size 1 x 1
|
static Region |
Region.grow(Location loc,
int w,
int h)
create a region with the given point as center and the given size
|
static Region |
Region.grow(Location loc,
int x,
int y,
int w,
int h)
create a region with a corner at the given point
as specified with x y 0 0 top left 0 1 bottom left 1 0 top right 1 1 bottom right same as the corresponding create method, here to be naming compatible with class Location |
Region |
Region.highlight()
Toggle the regions Highlight visibility (red frame)
|
Region |
Region.highlight(float secs)
show the regions Highlight for the given time in seconds (red frame) if 0 - use the global Settings.SlowMotionDelay
|
Region |
Region.highlight(float secs,
String color)
show the regions Highlight for the given time in seconds (frame of specified color) if 0 - use the global
Settings.SlowMotionDelay
|
Region |
Region.highlight(int secs)
hack to implement the getLastMatch() convenience 0 means same as highlight() < 0 same as highlight(secs) if
available the last match is highlighted
|
Region |
Region.highlight(int secs,
String color)
Show highlight in selected color
|
Region |
Region.highlight(String color)
Toggle the regions Highlight visibility (frame of specified color)
allowed color specifications for frame color: - a color name out of: black, blue, cyan, gray, green, magenta, orange, pink, red, white, yellow (lowercase and uppercase can be mixed, internally transformed to all uppercase) - these colornames exactly written: lightGray, LIGHT_GRAY, darkGray and DARK_GRAY - a hex value like in HTML: #XXXXXX (max 6 hex digits) - an RGB specification as: #rrrgggbbb where rrr, ggg, bbb are integer values in range 0 - 255 padded with leading zeros if needed (hence exactly 9 digits) |
Region |
Region.inside()
Deprecated.
only for backward compatibility
|
Region |
Region.intersection(Region ir)
create a region that is the intersection of the given regions
|
Region |
Region.left()
create a region left of the left side with same height
the new region extends to the left screen border use grow() to include the current region |
Region |
Region.left(int width)
create a region left of the left side with same height and given width
negative width creates the left part with width inside the region use grow() to include the current region |
Region |
Region.morphTo(Region r)
Deprecated.
to be like AWT Rectangle API use setRect() instead
|
Region |
Region.moveTo(Location loc)
Deprecated.
to be like AWT Rectangle API use setLocation()
|
Region |
Region.nearby()
Deprecated.
to be like AWT Rectangle API use grow() instead
|
Region |
Region.nearby(int range)
Deprecated.
to be like AWT Rectangle API use grow() instaed
|
Region |
Screen.newRegion(Location loc,
int width,
int height)
creates a region on the current screen with the given coordinate/size.
|
Region |
Region.offset(int x,
int y)
create region with same size at top left corner offset
|
Region |
Region.offset(Location loc)
create region with same size at top left corner offset
|
Region |
Region.right()
create a region right of the right side with same height.
|
Region |
Region.right(int width)
create a region right of the right side with same height and given width.
|
Region |
Screen.selectRegion()
interactive region create with predefined message: lets the user draw the rectangle using the
mouse
|
Region |
Screen.selectRegion(String message)
interactive region create with given message: lets the user draw the rectangle using the mouse
|
Region |
Region.setBottomLeft(Location loc)
Moves the region to the area, whose bottom left corner is the given location
|
Region |
Region.setBottomRight(Location loc)
Moves the region to the area, whose bottom right corner is the given location
|
Region |
Region.setCenter(Location loc)
Moves the region to the area, whose center is the given location
|
Region |
Region.setCols(int n)
store info: this region is divided horizontally into n even columns
a preparation for using getCol() |
Region |
Region.setLocation(Location loc)
set the regions position
this might move the region even to another screen |
Region |
Region.setRaster(int r,
int c)
store info: this region is divided into a raster of even cells
a preparation for using getCell() |
Region |
Region.setRect(int X,
int Y,
int W,
int H)
set the regions position/size
this might move the region even to another screen |
Region |
Region.setRect(Rectangle r)
set the regions position/size
this might move the region even to another screen |
Region |
Region.setRect(Region r)
set the regions position/size
this might move the region even to another screen |
Region |
Region.setRows(int n)
store info: this region is divided vertically into n even rows
a preparation for using getRow() |
Region |
Region.setSize(int W,
int H) |
Region |
Region.setTopLeft(Location loc)
Moves the region to the area, whose top left corner is the given location
|
Region |
Region.setTopRight(Location loc)
Moves the region to the area, whose top right corner is the given location
|
static Region |
App.start(App.Type appType) |
Region |
Region.union(Region ur)
create a new region containing both regions
|
static Region |
Commands.use(Object... args)
all following undotted function calls will use the given screen or region
until this is changed by a later use()
-- no args: use Screen(0) (this is the default after start) -- a number: use Screen(number), Screen(0) if not valid -- a region: use the given region |
static Region |
Commands.use1(Object... args)
same as use(), but only affects the next processed undotted function
after that the use() active before is restored
|
static Region |
Region.virtual(Rectangle rect)
INTERNAL USE - EXPERIMENTAL if true: this region is not bound to any screen
|
Region |
App.waitForWindow() |
Region |
App.waitForWindow(int seconds) |
Region |
App.window()
evaluates the region currently occupied by the topmost window of this App instance.
|
Region |
App.window(int winNum)
evaluates the region currently occupied by the window with the given number of this App instance.
|
Modifier and Type | Method and Description |
---|---|
Region |
Region.add(Region r)
extend the region, so it contains the given region
but only the part inside the current screen |
ScreenImage |
Screen.capture(Region reg)
create a ScreenImage with given region on this screen
|
ScreenImage |
IScreen.capture(Region reg) |
boolean |
Region.contains(Region region)
check if current region contains given region
|
static Region |
Region.create(Region r)
Create a region from another region
including the region's settings |
static String |
FindFailed.createdefault(Region reg,
Image img) |
static ObserveEvent[] |
Observing.getEvents(Region reg)
return the events for that region
events are removed from the list |
static boolean |
Observing.hasEvents(Region reg)
are their any happened events for this region?
|
Region |
Region.intersection(Region ir)
create a region that is the intersection of the given regions
|
List<Match> |
TextRecognizer.listText(ScreenImage simg,
Region parent) |
List<Match> |
TextRecognizer.listText(ScreenImage simg,
Region parent,
TextRecognizer.ListTextMode mode) |
Region |
Region.morphTo(Region r)
Deprecated.
to be like AWT Rectangle API use setRect() instead
|
static Location |
Sikulix.popat(Region at) |
static void |
Observing.remove(Region reg)
stop and remove all observers registered for this region from the list
events for those observers are removed as well |
String |
Screen.saveCapture(String name,
Region reg) |
Region |
Region.setRect(Region r)
set the regions position/size
this might move the region even to another screen |
boolean |
ImageFinder.setRegion(Region reg) |
void |
Region.setROI(Region reg)
resets this region to the given region
this might move the region even to another screen Because of the wanted side effect for the containing screen, this should only be used with screen objects. |
Region |
Region.union(Region ur)
create a new region containing both regions
|
Constructor and Description |
---|
Finder(ScreenImage simg,
Region region)
Finder constructor for special use from a ScreenImage
|
Finder(String imageFilename,
Region region)
Finder constructor (finding within an image within the given region).
|
ImageFinder(Region reg) |
Match(Region reg,
double sc)
create a Match from a region with given SimScore
|
Region(Region r)
Create a new region from another region
including the region's settings |
Modifier and Type | Method and Description |
---|---|
int |
HorizontalComparator.compare(Region region1,
Region region2)
Compares the X-Position of two
Region objects. |
int |
DistanceComparator.compare(Region region1,
Region region2)
Compares the distance of two
Region objects. |
int |
VerticalComparator.compare(Region region1,
Region region2)
Compares the Y-Position of two
Region objects. |
Constructor and Description |
---|
DistanceComparator(Region region)
Constructor for class DistanceComparator.
|
Modifier and Type | Method and Description |
---|---|
void |
ScreenHighlighter.highlight(Region r_) |
void |
ScreenHighlighter.highlight(Region r_,
float secs) |
Copyright © 2017. All rights reserved.