Package org.sikuli.script
Class Region
java.lang.Object
org.sikuli.script.Element
org.sikuli.script.Region
public class Region extends Element
A Region is a rectengular area on a screen.
- when needed (find ops), the pixel content is captured from the screen
- if nothing else is said, the center pixel is the target for mouse actions
completely contained in that screen (no screen overlapping)
NOTES:- when needed (find ops), the pixel content is captured from the screen
- if nothing else is said, the center pixel is the target for mouse actions
-
Field Summary
Fields Modifier and Type Field Description static intBBstatic intBHstatic intBLstatic intBMstatic intBOTTOMFlag for thecreate(Location, int, int, int, int)method.static intBRstatic intC2static intCHstatic intCVstatic intEASTstatic intEAST_MIDstatic intEAST_NORTHstatic intEAST_SOUTHstatic intEHstatic intEMstatic intENstatic intESstatic intLBstatic intLEFTFlag for thecreate(Location, int, int, int, int)method.static intLHstatic intLLstatic intLMstatic StringlogNamestatic intLTstatic intM2static intM3static intMHstatic intMID_HORIZONTALstatic intMID_VERTICALstatic intMIDDLEstatic intMIDDLE_BIGstatic intMMstatic intMVstatic intNEstatic intNHstatic intNMstatic intNORTHstatic intNORTH_EASTstatic intNORTH_MIDstatic intNORTH_WESTthe area constants for use with get()static intNWthe area constants for use with get()protected booleanotherScreenstatic intRBstatic intRHstatic intRIGHTFlag for thecreate(Location, int, int, int, int)method.static intRMstatic intRRstatic intRTstatic intSEstatic intSHstatic intSMstatic intSOUTHstatic intSOUTH_EASTstatic intSOUTH_MIDstatic intSOUTH_WESTstatic intSWstatic intTHstatic intTLthe area constants for use with get()static intTMstatic intTOPFlag for thecreate(Location, int, int, int, int)method.static intTRstatic intTTstatic intWESTstatic intWEST_MIDstatic intWEST_NORTHstatic intWEST_SOUTHstatic intWHstatic intWMstatic intWNstatic intWSFields inherited from class org.sikuli.script.Element
h, imageMissingHandler, lastFindTime, lastMatch, lastMatches, lastSearchTime, lastSearchTimeRepeat, logLevel, w, x, y -
Constructor Summary
Constructors Modifier Constructor Description protectedRegion()internal use only, used for new Screen objects to get the Region behaviorprotectedRegion(boolean isScreenUnion)internal use only, used for new Screen objects to get the Region behaviorRegion(int X, int Y)Convenience: a minimal Region to be used as a PointRegion(int X, int Y, int W, int H)Create a region with the provided coordinate / sizeRegion(int X, int Y, int W, int H, int screenNumber)Create a region with the provided coordinate / size and screenRegion(int X, int Y, int W, int H, IScreen parentScreen)Create a region with the provided coordinate / size and screenRegion(Rectangle r)Create a region from a RectangleRegion(Region r)Create a new region from another region. -
Method Summary
Modifier and Type Method Description Regionabove()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 regionRegionabove(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 regionLocationaboveAt()LocationaboveAt(int offset)negative offset goes towards top of screen
might be off current screenRegionadd(int l, int r, int t, int b)resize the region using the given padding values
might be negativeRegionadd(Location loc)extend the region, so it contains the given point
but only the part inside the current screenRegionadd(Region r)extend the region, so it contains the given region
but only the part inside the current screenvoidaInput(String text)voidaKey(int key)LocationasOffset()create a Location object, that can be used as an offset taking the width and hight of this Region<PFRML> voidaSwipe(PFRML from, PFRML to)voidaSwipeDown()voidaSwipeLeft()voidaSwipeRight()voidaSwipeUp()<PFRML> voidaTap(PFRML target)static LocationatMouse()Deprecated.useMouse.at()insteadRegionbelow()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 regionRegionbelow(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 regionLocationbelowAt()LocationbelowAt(int offset)positive offset goes towards bottom of screen
might be off current screenLocationcheckMatch()intclick()left click at the region's last successful match
use center if no lastMatch
if region is a match: click targetOffset<PFRML> intclick(PFRML target)left click at the given target location
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point<PFRML> intclick(PFRML target, Integer modifiers)left click at the given target location
holding down the given modifier keys
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that pointbooleancontains(Location point)check if current region contains given pointbooleancontains(Region region)check if current region contains given regionbooleancontainsMouse()check if mouse pointer is inside current regionRegioncopyTo(int scrID)new region with same offset to current screen's top left on given screenRegioncopyTo(IScreen screen)new region with same offset to current screen's top left on given screenstatic Regioncreate(int X, int Y, int W, int H)Create a region with the provided top left corner and sizestatic Regioncreate(int X, int Y, int W, int H, IScreen scr)Create a region with the provided top left corner and sizestatic Regioncreate(Rectangle r)Create a region from a Rectangleprotected static Regioncreate(Rectangle r, IScreen parentScreen)Create a region from a Rectangle on a given Screenstatic Regioncreate(Location loc, int w, int h)Create a region with the provided top left corner and sizestatic Regioncreate(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 rightstatic Regioncreate(Region r)Create a region from another region
including the region's settingsvoiddelayClick(int millisecs)time in milliseconds to delay between button down/up at next click only (max 1000)voiddelayType(int millisecs)time in milliseconds to delay between each character at next type only (max 1000)intdoubleClick()double click at the region's last successful match
use center if no lastMatch
if region is a match: click targetOffset<PFRML> intdoubleClick(PFRML target)double click at the given target location
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point<PFRML> intdoubleClick(PFRML target, Integer modifiers)double click at the given target location
holding down the given modifier keys
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point<PFRML> intdrag(PFRML target)Prepare a drag action: move mouse to given target
press and hold left mouse button
wait Settings.DelayAfterDrag<PFRML> intdragDrop(PFRML target)Drag from region's last match and drop at given target
applying Settings.DelayAfterDrag and DelayBeforeDrop
using left mouse button<PFRML> intdragDrop(PFRML t1, PFRML t2)Drag from a position and drop to another using left mouse button
applying Settings.DelayAfterDrag and DelayBeforeDrop<PFRML> intdropAt(PFRML target)finalize a drag action with a drop: move mouse to given target
wait Settings.DelayBeforeDrop
before releasing the left mouse button<PSI> Matchexists(PSI target)Check if target exists (with the default autoWaitTimeout), does not raise FindFailed<PSI> Matchexists(PSI target, double timeout)Check if target exists with a specified timeout
timout = 0: returns immediately after first search, does not raise FindFailedMatchexistsText(String text)MatchexistsText(String text, double timeout)<PSI> Matchfind(PSI target)finds the given Pattern, String or Image in the region and returns the best match.<PSI> Iterator<Match>findAll(PSI target)finds all occurences of the given Pattern, String or Image in the region and returns an Iterator of Matches.<PSI> List<Match>findAllByColumn(PSI target)<PSI> List<Match>findAllByRow(PSI target)<PSI> List<Match>findAllList(PSI target)List<Match>findAllText(String text)List<Match>findAny(Object... args)List<Match>findAnyList(List<Object> pList)MatchfindBest(Object... args)MatchfindBestList(List<Object> pList)MatchfindText(String text)Regionget(int part)<PSI> List<Match>getAll(PSI target)doublegetAutoWaitTimeout()current setting for this region (see setAutoWaitTimeout)LocationgetBottomLeft()LocationgetBottomRight()RegiongetCell(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 respectivelyLocationgetCenter()RegiongetCol(int c)get the specified column counting from 0
negative counts reverse from the end (last is -1)
values outside range are 0 or last respectivelyRegiongetCol(int c, int n)divide the region in n columns and select column c as new RegionintgetCols()intgetColW()static RegiongetDefaultInstance4py()ObserveEventgetEvent(String name)the event is removed from the listObserveEvent[]getEvents()the region's events are removed from the listprotected static RegiongetFakeRegion()FindFailedResponsegetFindFailedResponse()ImagegetImage()RegiongetInset(Region inset)ScreenImagegetLastScreenImage()get the last image taken on this regions screenStringgetLastScreenImageFile()stores the lastScreenImage in the current bundle path with a created unique nameStringgetLastScreenImageFile(String name)stores the lastScreenImage in the current bundle path with the given nameStringgetLastScreenImageFile(String path, String name)stores the lastScreenImage in the given path with the given nameprotected <PSIMRL> LocationgetLocationFromTarget(PSIMRL target)ObservergetObserver()floatgetObserveScanRate()RectanglegetRect()protected static RectanglegetRectangle(Rectangle rect, int part)intgetRepeatWaitTime()INTERNAL USE: ObserveRegiongetROI()A function only for backward compatibility - Only makes sense with Screen objectsRegiongetRow(int r)get the specified row counting from 0
negative counts reverse from the end (last is -1)
values outside range are 0 or last respectivelyRegiongetRow(int r, int n)intgetRowH()intgetRows()IScreengetScreen()IScreengetScreenContaining()Deprecated.Only for compatibility, to get the screen containing this region, usegetScreen()LocationgetTarget()convenience methodbooleangetThrowException()current settingsetThrowException(boolean)LocationgetTopLeft()LocationgetTopRight()floatgetWaitScanRate()Regiongrow()create a region enlarged n pixels on each side (n = Settings.DefaultPadding = 50 default)Regiongrow(int range)create a region enlarged range pixels on each sideRegiongrow(int w, int h)create a region enlarged w pixels on left and right side and h pixels at top and bottomRegiongrow(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 Regiongrow(Location loc)create a minimal region at given point with size 1 x 1static Regiongrow(Location loc, int w, int h)create a region with the given point as center and the given sizestatic Regiongrow(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<PSI> booleanhas(PSI target)Check if target exists
- does not raise FindFailed - like exists(target, 0) but returns true/false
- which means only one search
- no wait for target to appear
- intended to be used in logical expressions
- use getLastMatch() to get the match if found<PSI> booleanhas(PSI target, double timeout)Check if target appears within the specified time
- does not raise FindFailed - like exists(target, timeout) but returns true/false
- intended to be used in logical expressions
- use getLastMatch() to get the match if foundbooleanhasEvents()booleanhasObserver()evaluate if at least one event observer is defined for this region (the observer need not be running)booleanhasText(String text)Regionhighlight()show a colored frame around the region for a given time or switch on/offRegionhighlight(double secs)show the regions Highlight for the given time in seconds (red frame) if 0 - use the global Settings.SlowMotionDelayRegionhighlight(double secs, String color)show the regions Highlight for the given time in seconds (frame of specified color) if 0 - use the global Settings.SlowMotionDelayRegionhighlight(String color)Toggle the regions Highlight border (given 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)Regionhighlight4py(ArrayList args)INTERNAL: highlight (for Python support):static voidhighlightAllOff()Switch off all actual highlightsRegionhighlightOff()Switch off the regions highlightRegionhighlightOn()Switch on the regions highlight with default colorRegionhighlightOn(String color)Switch on the regions highlight with given colorinthover()move the mouse pointer to region's last successful match
use center if no lastMatch
if region is a match: move to targetOffset
same as mouseMove<PFRML> inthover(PFRML target)move the mouse pointer to the given target location
same as mouseMove
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that pointvoidinitScreen(IScreen iscr)INTERNAL USERegioninside()Deprecated.only for backward compatibilityvoidinternalUseOnlyHighlightReset()INTERNAL USE ONLYRegionintersection(Region ir)create a region that is the intersection of the given regionsbooleanisObserving()booleanisOtherScreen()INTERNAL USE: checks wether this region belongs to a non-Desktop screenbooleanisRasterValid()Can be used to check, wether the Region currently has a valid rasterbooleanisValid()Check wether thie Region is contained by any of the available screensbooleanisVirtual()INTERNAL USE - EXPERIMENTAL if true: this region is not bound to any screenvoidkeyDown(int keycode)press and hold the given key use a constant from java.awt.event.KeyEvent which might be special in the current machine/system environmentvoidkeyDown(String keys)press and hold the given keys including modifier keys
use the key constants defined in class Key,
which only provides a subset of a US-QWERTY PC keyboard layout
might be mixed with simple characters
use + to concatenate Key constantsvoidkeyUp()release all currently pressed keysvoidkeyUp(int keycode)release the given keys (see keyDown(keycode) )voidkeyUp(String keys)release the given keys (see keyDown(keys) )Regionleft()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 regionRegionleft(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 regionLocationleftAt()LocationleftAt(int offset)negative offset goes to the left
might be off current screenstatic Regionmake4py(ArrayList args)RegionmorphTo(Region r)Deprecated.to be like AWT Rectangle API use setRect() insteadvoidmouseDown(int buttons)press and hold the specified buttons - use + to combine Button.LEFT left mouse button Button.MIDDLE middle mouse button Button.RIGHT right mouse buttonintmouseMove()move the mouse pointer to the region's last successful match
same as hoverintmouseMove(int xoff, int yoff)move the mouse from the current position to the offset position given by the parameters<PFRML> intmouseMove(PFRML target)move the mouse pointer to the given target location
same as hover
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that pointvoidmouseUp()release all currently held buttonsvoidmouseUp(int buttons)release the specified mouse buttons (see mouseDown) if buttons==0, all currently held buttons are releasedRegionmoveTo(Location loc)Deprecated.to be like AWT Rectangle API use setLocation()Regionnearby()Deprecated.to be like AWT Rectangle API use grow() insteadRegionnearby(int range)Deprecated.to be like AWT Rectangle API use grow() instaedbooleanobserve()start an observer in this region that runs forever (use stopObserving() in handler) for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEventbooleanobserve(double secs)start an observer in this region for the given time for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEventbooleanobserveInBackground()start an observer in this region that runs in background forever - for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEventbooleanobserveInBackground(double secs)start an observer in this region for the given time that runs in background - for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEventbooleanobserveInLine(double secs)INTERNAL USE ONLY: for use with scripting API bridgesRegionoffset(int x, int y)create region with same size at top left corner offsetRegionoffset(Object whatever)create region with same size at top left corner offset<PSI> StringonAppear(PSI target)a subsequently started observer in this region should wait for target success and details about the event can be obtained using @{link Observing}
for details about APPEAR/VANISH/CHANGE events:ObserveEvent<PSI> StringonAppear(PSI target, Object observer)a subsequently started observer in this region should wait for target and notify the given observer about this event
for details about the observe event handler:ObserverCallBack
for details about APPEAR/VANISH/CHANGE events:ObserveEventStringonChange()a subsequently started observer in this region should wait for changes in the region success and details about the event can be obtained using @{link Observing}
minimum size of changes used: Settings.ObserveMinChangedPixels for details about APPEAR/VANISH/CHANGE events:ObserveEventStringonChange(Integer threshold)a subsequently started observer in this region should wait for changes in the region success and details about the event can be obtained using @{link Observing}
for details about APPEAR/VANISH/CHANGE events:ObserveEventStringonChange(Integer threshold, Object observer)a subsequently started observer in this region should wait for changes in the region and notify the given observer about this event for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEventStringonChange(Object observer)a subsequently started observer in this region should wait for changes in the region and notify the given observer about this event
minimum size of changes used: Settings.ObserveMinChangedPixels for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEventStringonChangeDo(Integer threshold, Object observer)<PSI> StringonVanish(PSI target)a subsequently started observer in this region should wait for the target to vanish success and details about the event can be obtained using @{link Observing}
for details about APPEAR/VANISH/CHANGE events:ObserveEvent<PSI> StringonVanish(PSI target, Object observer)a subsequently started observer in this region should wait for the target to vanish and notify the given observer about this event
for details about the observe event handler:ObserverCallBack
for details about APPEAR/VANISH/CHANGE events:ObserveEventintpaste(String text)pastes the text at the current position of the focus/carret
using the clipboard and strg/ctrl/cmd-v (paste keyboard shortcut)<PFRML> intpaste(PFRML target, String text)first does a click(target) at the given target position to gain focus/carret
and then pastes the text
using the clipboard and strg/ctrl/cmd-v (paste keyboard shortcut)protected RectangleregionOnScreen(IScreen screen)Checks if the Screen contains the Region.protected List<Match>relocate(List<Match> matches)protected Matchrelocate(Match match)voidresetFindFailedResponse()reset to defaultsetFindFailedResponse(FindFailedResponse)voidresetScreens()synonym for resetMonitorsvoidresetThrowException()reset to defaultsetThrowException(boolean)Regionright()create a region right of the right side with same height.Regionright(int width)create a region right of the right side with same height and given width.LocationrightAt()point middle on right edgeLocationrightAt(int offset)positive offset goes to the right.intrightClick()right click at the region's last successful match
use center if no lastMatch
if region is a match: click targetOffset<PFRML> intrightClick(PFRML target)right click at the given target location
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point<PFRML> intrightClick(PFRML target, Integer modifiers)right click at the given target location
holding down the given modifier keys
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that pointStringsaveCapture(Object... args)voidsaveLastScreenImage()voidsetActive(String name)set the observer with the given name active (checked while observing)voidsetAutoWaitTimeout(double sec)the time in seconds a find operation should waitRegionsetBottomLeft(Location loc)Moves the region to the area, whose bottom left corner is the given locationRegionsetBottomRight(Location loc)Moves the region to the area, whose bottom right corner is the given locationRegionsetCenter(Location loc)Moves the region to the area, whose center is the given locationRegionsetCols(int n)store info: this region is divided horizontally into n even columns
a preparation for using getCol()voidsetFindFailedHandler(Object handler)voidsetFindFailedResponse(FindFailedResponse response)FindFailedResponse.
ABORT - abort script on FindFailed
SKIP - ignore FindFailed
PROMPT - display prompt on FindFailed to let user decide how to proceed
RETRY - continue to wait for appearence after FindFailed
HANDLE - call a handler on exceptionsetFindFailedHandler(Object)
default: ABORT
see also:setThrowException(boolean)RegionsetH(int H)voidsetInactive(String name)set the observer with the given name inactive (not checked while observing)RegionsetLocation(Location loc)set the regions position
this might move the region even to another screenvoidsetObserveScanRate(float observeScanRate)set the regions individual ObserveScanRatevoidsetOtherScreen()INTERNAL USE: flags this region as belonging to a non-Desktop screenRegionsetOtherScreen(IScreen aScreen)INTERNAL: flags this region as belonging to a non-Desktop screenRegionsetRaster(int r, int c)store info: this region is divided into a raster of even cells
a preparation for using getCell()
adjusted to a minimum cell size of 5 x 5 pixelsRegionsetRect(int X, int Y, int W, int H)set the regions position/size
this might move the region even to another screenRegionsetRect(Rectangle r)set the regions position/size
this might move the region even to another screenRegionsetRect(Region r)set the regions position/size
this might move the region even to another screenvoidsetRepeatWaitTime(int time)INTERNAL USE: Observe set the regions individual WaitForVanishvoidsetROI()resets this region (usually a Screen object) to the coordinates of the containing screenvoidsetROI(int X, int Y, int W, int H)resets this region to the given location, and size
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.voidsetROI(Rectangle r)resets this region to the given rectangle
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.voidsetROI(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.RegionsetRows(int n)store info: this region is divided vertically into n even rows
a preparation for using getRow()protected RegionsetScreen(int id)Sets a new Screen for this region.protected RegionsetScreen(IScreen scr)Sets a new Screen for this region.RegionsetSize(int W, int H)voidsetThrowException(boolean flag)true - should throwFindFailedif not found in this region
false - do not abort script on FindFailed (might lead to NPE's later)
default:Settings.ThrowException
sideEffects:setFindFailedResponse(FindFailedResponse)true:ABORT, false:SKIP
see also:setFindFailedResponse(FindFailedResponse)
and:setFindFailedHandler(Object)RegionsetTopLeft(Location loc)Moves the region to the area, whose top left corner is the given locationRegionsetTopRight(Location loc)Moves the region to the area, whose top right corner is the given locationvoidsetVirtual(boolean state)INTERNAL USE - EXPERIMENTALRegionsetW(int W)voidsetWaitScanRate(float waitScanRate)set the regions individual WaitScanRateRegionsetX(int X)RegionsetY(int Y)voidshowScreens()synonym for showMonitorsvoidstopObserver()stops a running observervoidstopObserver(String message)stops a running observer printing an info messageprotected MatchtoGlobalCoord(Match m)used in Observer.callChangeObserving, Finder.next to adjust region relative coordinates of matches to screen coordinatesStringtoString()StringtoStringShort()inttype(String text)enters the given text one character/key after another using keyDown/keyUp
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout
the text is entered at the current position of the focus/carretinttype(String text, int modifiers)enters the given text one character/key after another using keyDown/keyUp
while holding down the given modifier keys
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout
the text is entered at the current position of the focus/carretinttype(String text, String modifiers)enters the given text one character/key after another using<PFRML> inttype(PFRML target, String text)first does a click(target) at the given target position to gain focus/carret
enters the given text one character/key after another using keyDown/keyUp
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout<PFRML> inttype(PFRML target, String text, int modifiers)first does a click(target) at the given target position to gain focus/carret
enters the given text one character/key after another using keyDown/keyUp
while holding down the given modifier keys
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout<PFRML> inttype(PFRML target, String text, String modifiers)first does a click(target) at the given target position to gain focus/carret
enters the given text one character/key after another using keyDown/keyUp
while holding down the given modifier keys
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layoutRegionunion(Region ur)create a new region containing both regions<PSI> RegionunionAll(PSI target)RegionunionAny(Object... targets)RegionunionAnyList(List<Object> targets)static Regionvirtual(Rectangle rect)INTERNAL USE - EXPERIMENTAL if true: this region is not bound to any screenvoidwait(double timeout)WARNING: wait(long timeout) is taken by Java Object as final.<PSI> Matchwait(PSI target)Waits for the Pattern, String or Image to appear until the AutoWaitTimeout value is exceeded.<PSI> Matchwait(PSI target, double timeout)Waits for the Pattern, String or Image to appear or timeout (in second) is passedMatchwaitT(String text)MatchwaitT(String text, double timeout)MatchwaitText(String text)MatchwaitText(String text, double timeout)<PSI> booleanwaitVanish(PSI target)waits until target vanishes or timeout (in seconds) is passed (AutoWaitTimeout)<PSI> booleanwaitVanish(PSI target, double timeout)waits until target vanishes or timeout (in seconds) is passedintwheel(int direction, int steps)Move the wheel at the current mouse position
the given steps in the given direction:
Button.WHEEL_DOWN, Button.WHEEL_UP<PFRML> intwheel(PFRML target, int direction, int steps)move the mouse pointer to the given target location
and move the wheel the given steps in the given direction:
Button.WHEEL_DOWN, Button.WHEEL_UP<PFRML> intwheel(PFRML target, int direction, int steps, int stepDelay)move the mouse pointer to the given target location
and move the wheel the given steps in the given direction:
Button.WHEEL_DOWN, Button.WHEEL_UPintwrite(String text)Compact alternative for type() with more options
- special keys and options are coded as #XN.Methods inherited from class org.sikuli.script.Element
collectLines, collectLinesText, collectWords, collectWordsText, existsT, findAllT, findLine, findLines, findLines, findT, findWord, findWords, findWords, getBufferedImage, getH, getImageFromTarget, getLastMatch, getLastMatches, getName, getW, getX, getY, hasT, isEmpty, log, returnThis, setImageMissingHandler, setName, text, textChar, textLine, textLines, textWord, textWords
-
Field Details
-
logName
- See Also:
- Constant Field Values
-
otherScreen
protected boolean otherScreen -
LEFT
public static final int LEFTFlag for thecreate(Location, int, int, int, int)method. Sets the Location to be on the left corner of the new Region.- See Also:
- Constant Field Values
-
RIGHT
public static final int RIGHTFlag for thecreate(Location, int, int, int, int)method. Sets the Location to be on the right corner of the new Region.- See Also:
- Constant Field Values
-
TOP
public static final int TOPFlag for thecreate(Location, int, int, int, int)method. Sets the Location to be on the top corner of the new Region.- See Also:
- Constant Field Values
-
BOTTOM
public static final int BOTTOMFlag for thecreate(Location, int, int, int, int)method. Sets the Location to be on the bottom corner of the new Region.- See Also:
- Constant Field Values
-
NW
public static final int NWthe area constants for use with get()- See Also:
- Constant Field Values
-
NORTH_WEST
public static final int NORTH_WESTthe area constants for use with get()- See Also:
- Constant Field Values
-
TL
public static final int TLthe area constants for use with get()- See Also:
- Constant Field Values
-
NM
public static final int NM- See Also:
- Constant Field Values
-
NORTH_MID
public static final int NORTH_MID- See Also:
- Constant Field Values
-
TM
public static final int TM- See Also:
- Constant Field Values
-
NE
public static final int NE- See Also:
- Constant Field Values
-
NORTH_EAST
public static final int NORTH_EAST- See Also:
- Constant Field Values
-
TR
public static final int TR- See Also:
- Constant Field Values
-
EM
public static final int EM- See Also:
- Constant Field Values
-
EAST_MID
public static final int EAST_MID- See Also:
- Constant Field Values
-
RM
public static final int RM- See Also:
- Constant Field Values
-
SE
public static final int SE- See Also:
- Constant Field Values
-
SOUTH_EAST
public static final int SOUTH_EAST- See Also:
- Constant Field Values
-
BR
public static final int BR- See Also:
- Constant Field Values
-
SM
public static final int SM- See Also:
- Constant Field Values
-
SOUTH_MID
public static final int SOUTH_MID- See Also:
- Constant Field Values
-
BM
public static final int BM- See Also:
- Constant Field Values
-
SW
public static final int SW- See Also:
- Constant Field Values
-
SOUTH_WEST
public static final int SOUTH_WEST- See Also:
- Constant Field Values
-
BL
public static final int BL- See Also:
- Constant Field Values
-
WM
public static final int WM- See Also:
- Constant Field Values
-
WEST_MID
public static final int WEST_MID- See Also:
- Constant Field Values
-
LM
public static final int LM- See Also:
- Constant Field Values
-
MM
public static final int MM- See Also:
- Constant Field Values
-
MIDDLE
public static final int MIDDLE- See Also:
- Constant Field Values
-
M3
public static final int M3- See Also:
- Constant Field Values
-
TT
public static final int TT- See Also:
- Constant Field Values
-
RR
public static final int RR- See Also:
- Constant Field Values
-
BB
public static final int BB- See Also:
- Constant Field Values
-
LL
public static final int LL- See Also:
- Constant Field Values
-
NH
public static final int NH- See Also:
- Constant Field Values
-
NORTH
public static final int NORTH- See Also:
- Constant Field Values
-
TH
public static final int TH- See Also:
- Constant Field Values
-
EH
public static final int EH- See Also:
- Constant Field Values
-
EAST
public static final int EAST- See Also:
- Constant Field Values
-
RH
public static final int RH- See Also:
- Constant Field Values
-
SH
public static final int SH- See Also:
- Constant Field Values
-
SOUTH
public static final int SOUTH- See Also:
- Constant Field Values
-
BH
public static final int BH- See Also:
- Constant Field Values
-
WH
public static final int WH- See Also:
- Constant Field Values
-
WEST
public static final int WEST- See Also:
- Constant Field Values
-
LH
public static final int LH- See Also:
- Constant Field Values
-
MV
public static final int MV- See Also:
- Constant Field Values
-
MID_VERTICAL
public static final int MID_VERTICAL- See Also:
- Constant Field Values
-
CV
public static final int CV- See Also:
- Constant Field Values
-
MH
public static final int MH- See Also:
- Constant Field Values
-
MID_HORIZONTAL
public static final int MID_HORIZONTAL- See Also:
- Constant Field Values
-
CH
public static final int CH- See Also:
- Constant Field Values
-
M2
public static final int M2- See Also:
- Constant Field Values
-
MIDDLE_BIG
public static final int MIDDLE_BIG- See Also:
- Constant Field Values
-
C2
public static final int C2- See Also:
- Constant Field Values
-
EN
public static final int EN- See Also:
- Constant Field Values
-
EAST_NORTH
public static final int EAST_NORTH- See Also:
- Constant Field Values
-
RT
public static final int RT- See Also:
- Constant Field Values
-
ES
public static final int ES- See Also:
- Constant Field Values
-
EAST_SOUTH
public static final int EAST_SOUTH- See Also:
- Constant Field Values
-
RB
public static final int RB- See Also:
- Constant Field Values
-
WN
public static final int WN- See Also:
- Constant Field Values
-
WEST_NORTH
public static final int WEST_NORTH- See Also:
- Constant Field Values
-
LT
public static final int LT- See Also:
- Constant Field Values
-
WS
public static final int WS- See Also:
- Constant Field Values
-
WEST_SOUTH
public static final int WEST_SOUTH- See Also:
- Constant Field Values
-
LB
public static final int LB- See Also:
- Constant Field Values
-
-
Constructor Details
-
Region
protected Region()internal use only, used for new Screen objects to get the Region behavior -
Region
protected Region(boolean isScreenUnion)internal use only, used for new Screen objects to get the Region behavior -
Region
public Region(int X, int Y, int W, int H, int screenNumber)Create a region with the provided coordinate / size and screen- Parameters:
X- X positionY- Y positionW- widthH- heigthscreenNumber- The number of the screen containing the Region
-
Region
Create a region with the provided coordinate / size and screen- Parameters:
X- X positionY- Y positionW- widthH- heigthparentScreen- the screen containing the Region
-
Region
public Region(int X, int Y)Convenience: a minimal Region to be used as a Point- Parameters:
X- top left xY- top left y
-
Region
public Region(int X, int Y, int W, int H)Create a region with the provided coordinate / size- Parameters:
X- X positionY- Y positionW- widthH- heigth
-
Region
Create a region from a Rectangle- Parameters:
r- the Rectangle
-
Region
Create a new region from another region. including the region's settings- Parameters:
r- the region
-
-
Method Details
-
getDefaultInstance4py
-
make4py
-
setX
- Parameters:
X- new x position of top left corner- Returns:
- this Region
-
setY
- Parameters:
Y- new y position of top left corner- Returns:
- this Region
-
setW
- Parameters:
W- new width- Returns:
- this Region
-
setH
- Parameters:
H- new height- Returns:
- this Region
-
setThrowException
public void setThrowException(boolean flag)true - should throwFindFailedif not found in this region
false - do not abort script on FindFailed (might lead to NPE's later)
default:Settings.ThrowException
sideEffects:setFindFailedResponse(FindFailedResponse)true:ABORT, false:SKIP
see also:setFindFailedResponse(FindFailedResponse)
and:setFindFailedHandler(Object)- Parameters:
flag- true/false
-
resetThrowException
public void resetThrowException()reset to defaultsetThrowException(boolean) -
getThrowException
public boolean getThrowException()current settingsetThrowException(boolean)- Returns:
- true/false
-
setFindFailedResponse
FindFailedResponse.
ABORT - abort script on FindFailed
SKIP - ignore FindFailed
PROMPT - display prompt on FindFailed to let user decide how to proceed
RETRY - continue to wait for appearence after FindFailed
HANDLE - call a handler on exceptionsetFindFailedHandler(Object)
default: ABORT
see also:setThrowException(boolean)- Parameters:
response-FindFailed
-
resetFindFailedResponse
public void resetFindFailedResponse()reset to defaultsetFindFailedResponse(FindFailedResponse) -
getFindFailedResponse
- Returns:
- the current setting
setFindFailedResponse(FindFailedResponse)
-
setFindFailedHandler
-
setAutoWaitTimeout
public void setAutoWaitTimeout(double sec)the time in seconds a find operation should waitfor the appearence of the target in this region
initial value is the global AutoWaitTimeout setting at time of Region creation- Parameters:
sec- seconds
-
getAutoWaitTimeout
public double getAutoWaitTimeout()current setting for this region (see setAutoWaitTimeout)- Returns:
- value of seconds
-
getWaitScanRate
public float getWaitScanRate()- Returns:
- the regions current WaitScanRate
-
setWaitScanRate
public void setWaitScanRate(float waitScanRate)set the regions individual WaitScanRate- Parameters:
waitScanRate- decimal number
-
getObserveScanRate
public float getObserveScanRate()- Returns:
- the regions current ObserveScanRate
-
setObserveScanRate
public void setObserveScanRate(float observeScanRate)set the regions individual ObserveScanRate- Parameters:
observeScanRate- decimal number
-
getRepeatWaitTime
public int getRepeatWaitTime()INTERNAL USE: Observe- Returns:
- the regions current RepeatWaitTime time in seconds
-
setRepeatWaitTime
public void setRepeatWaitTime(int time)INTERNAL USE: Observe set the regions individual WaitForVanish- Parameters:
time- in seconds
-
getFakeRegion
-
toString
-
toStringShort
- Returns:
- a compact description
-
getImage
-
initScreen
INTERNAL USE- Parameters:
iscr- screen
-
virtual
INTERNAL USE - EXPERIMENTAL if true: this region is not bound to any screen- Parameters:
rect- rectangle- Returns:
- the current state
-
isVirtual
public boolean isVirtual()INTERNAL USE - EXPERIMENTAL if true: this region is not bound to any screen- Returns:
- the current state
-
setVirtual
public void setVirtual(boolean state)INTERNAL USE - EXPERIMENTAL- Parameters:
state- if true: this region is not bound to any screen
-
isOtherScreen
public boolean isOtherScreen()INTERNAL USE: checks wether this region belongs to a non-Desktop screen- Returns:
- true/false
-
setOtherScreen
public void setOtherScreen()INTERNAL USE: flags this region as belonging to a non-Desktop screen -
setOtherScreen
INTERNAL: flags this region as belonging to a non-Desktop screen- Parameters:
aScreen- screen- Returns:
- this Region
-
regionOnScreen
Checks if the Screen contains the Region.- Parameters:
screen- The Screen in which the Region might be- Returns:
- True, if the Region is on the Screen. False if the Region is not inside the Screen
-
isValid
public boolean isValid()Check wether thie Region is contained by any of the available screens- Returns:
- true if yes, false otherwise
-
create
Create a region with the provided top left corner and size- Parameters:
X- top left X positionY- top left Y positionW- widthH- heigth- Returns:
- then new region
-
create
Create a region with the provided top left corner and size- Parameters:
X- top left X positionY- top left Y positionW- widthH- heigthscr- the source screen- Returns:
- the new region
-
create
Create a region with the provided top left corner and size- Parameters:
loc- top left cornerw- widthh- height- Returns:
- then new region
-
create
public static 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- Parameters:
loc- the refence pointcreate_x_direction- == 0 is left side !=0 is right sidecreate_y_direction- == 0 is top side !=0 is bottom sidew- the widthh- the height- Returns:
- the new region
-
grow
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- Parameters:
loc- the refence pointx- ==0 is left side !=0 is right sidey- ==0 is top side !=0 is bottom sidew- the widthh- the height- Returns:
- the new region
-
create
Create a region from a Rectangle- Parameters:
r- the Rectangle- Returns:
- the new region
-
create
Create a region from a Rectangle on a given Screen- Parameters:
r- the RectangleparentScreen- the new parent screen- Returns:
- the new region
-
create
Create a region from another region
including the region's settings- Parameters:
r- the region- Returns:
- then new region
-
grow
create a region with the given point as center and the given size- Parameters:
loc- the center pointw- the widthh- the height- Returns:
- the new region
-
grow
create a minimal region at given point with size 1 x 1- Parameters:
loc- the point- Returns:
- the new region
-
contains
check if current region contains given point- Parameters:
point- Point- Returns:
- true/false
-
containsMouse
public boolean containsMouse()check if mouse pointer is inside current region- Returns:
- true/false
-
copyTo
new region with same offset to current screen's top left on given screen- Parameters:
scrID- number of screen- Returns:
- new region
-
copyTo
new region with same offset to current screen's top left on given screen- Parameters:
screen- new parent screen- Returns:
- new region
-
toGlobalCoord
used in Observer.callChangeObserving, Finder.next to adjust region relative coordinates of matches to screen coordinates- Parameters:
m-- Returns:
- the modified match
-
getScreen
- Returns:
- the Screen object containing the region
-
getScreenContaining
Deprecated.Only for compatibility, to get the screen containing this region, usegetScreen()- Returns:
- the screen, that contains the top left corner of the region. Returns primary screen if outside of any screen.
-
setScreen
Sets a new Screen for this region.- Parameters:
scr- the containing screen object- Returns:
- the region itself
-
setScreen
Sets a new Screen for this region.- Parameters:
id- the containing screen object's id- Returns:
- the region itself
-
showScreens
public void showScreens()synonym for showMonitors -
resetScreens
public void resetScreens()synonym for resetMonitors -
getCenter
- Returns:
- the center pixel location of the region
-
getTarget
convenience method- Returns:
- the region's center
-
setCenter
Moves the region to the area, whose center is the given location- Parameters:
loc- the location which is the new center of the region- Returns:
- the region itself
-
getTopLeft
- Returns:
- top left corner Location
-
setTopLeft
Moves the region to the area, whose top left corner is the given location- Parameters:
loc- the location which is the new top left point of the region- Returns:
- the region itself
-
getTopRight
- Returns:
- top right corner Location
-
setTopRight
Moves the region to the area, whose top right corner is the given location- Parameters:
loc- the location which is the new top right point of the region- Returns:
- the region itself
-
getBottomLeft
- Returns:
- bottom left corner Location
-
setBottomLeft
Moves the region to the area, whose bottom left corner is the given location- Parameters:
loc- the location which is the new bottom left point of the region- Returns:
- the region itself
-
getBottomRight
- Returns:
- bottom right corner Location
-
setBottomRight
Moves the region to the area, whose bottom right corner is the given location- Parameters:
loc- the location which is the new bottom right point of the region- Returns:
- the region itself
-
setSize
- Parameters:
W- new widthH- new height- Returns:
- the region itself
-
getRect
- Returns:
- the AWT Rectangle of the region
-
setRect
set the regions position/size
this might move the region even to another screen- Parameters:
r- the AWT Rectangle to use for position/size- Returns:
- the region itself
-
setRect
set the regions position/size
this might move the region even to another screen- Parameters:
X- new x of top left cornerY- new y of top left cornerW- new widthH- new height- Returns:
- the region itself
-
setRect
set the regions position/size
this might move the region even to another screen- Parameters:
r- the region to use for position/size- Returns:
- the region itself
-
setROI
public void setROI()resets this region (usually a Screen object) to the coordinates of the containing screenBecause of the wanted side effect for the containing screen, this should only be used with screen objects. For Region objects use setRect() instead.
-
setROI
public void setROI(int X, int Y, int W, int H)resets this region to the given location, and size
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.
For Region objects use setRect() instead.- Parameters:
X- new xY- new yW- new widthH- new height
-
setROI
resets this region to the given rectangle
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.
For Region objects use setRect() instead.- Parameters:
r- AWT Rectangle
-
setROI
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.
For Region objects use setRect() instead.- Parameters:
reg- Region
-
getROI
A function only for backward compatibility - Only makes sense with Screen objects- Returns:
- the Region being the current ROI of the containing Screen
-
inside
Deprecated.only for backward compatibility- Returns:
- the region itself
-
moveTo
Deprecated.to be like AWT Rectangle API use setLocation()set the regions position
this might move the region even to another screen- Parameters:
loc- new top left corner- Returns:
- the region itself
-
setLocation
set the regions position
this might move the region even to another screen- Parameters:
loc- new top left corner- Returns:
- the region itself
-
morphTo
Deprecated.to be like AWT Rectangle API use setRect() insteadset the regions position/size
this might move the region even to another screen- Parameters:
r- Region- Returns:
- the region itself
-
add
resize the region using the given padding values
might be negative- Parameters:
l- padding on left sider- padding on right sidet- padding at top sideb- padding at bottom side- Returns:
- the region itself
-
add
extend the region, so it contains the given region
but only the part inside the current screen- Parameters:
r- the region to include- Returns:
- the region itself
-
add
extend the region, so it contains the given point
but only the part inside the current screen- Parameters:
loc- the point to include- Returns:
- the region itself
-
saveCapture
-
getLastScreenImage
get the last image taken on this regions screen- Returns:
- the stored ScreenImage
-
getLastScreenImageFile
stores the lastScreenImage in the current bundle path with a created unique name- Returns:
- the absolute file name
- Throws:
IOException- if not possible
-
getLastScreenImageFile
stores the lastScreenImage in the current bundle path with the given name- Parameters:
name- file name (.png is added if not there)- Returns:
- the absolute file name
- Throws:
IOException- if not possible
-
getLastScreenImageFile
stores the lastScreenImage in the given path with the given name- Parameters:
path- path to usename- file name (.png is added if not there)- Returns:
- the absolute file name
- Throws:
IOException- if not possible
-
saveLastScreenImage
public void saveLastScreenImage() -
contains
check if current region contains given region- Parameters:
region- the other Region- Returns:
- true/false
-
asOffset
create a Location object, that can be used as an offset taking the width and hight of this Region- Returns:
- a new Location object with width and height as x and y
-
offset
create region with same size at top left corner offset- Parameters:
whatever- offset taken from Region, Match, Image, Location or Offset- Returns:
- the new region
-
offset
create region with same size at top left corner offset- Parameters:
x- horizontal offsety- vertical offset- Returns:
- the new region
-
nearby
Deprecated.to be like AWT Rectangle API use grow() insteadcreate a region enlarged Settings.DefaultPadding pixels on each side- Returns:
- the new region
-
nearby
Deprecated.to be like AWT Rectangle API use grow() instaedcreate a region enlarged range pixels on each side- Parameters:
range- the margin to be added around- Returns:
- the new region
-
grow
create a region enlarged n pixels on each side (n = Settings.DefaultPadding = 50 default)- Returns:
- the new region
-
grow
create a region enlarged range pixels on each side- Parameters:
range- the margin to be added around- Returns:
- the new region
-
grow
create a region enlarged w pixels on left and right side and h pixels at top and bottom- Parameters:
w- pixels horizontallyh- pixels vertically- Returns:
- the new region
-
grow
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. negative values go inside (shrink)- Parameters:
l- add to the leftr- add to rightt- add aboveb- add beneath- Returns:
- the new region
-
rightAt
point middle on right edge- Returns:
- point middle on right edge
-
rightAt
positive offset goes to the right. might be off current screen- Parameters:
offset- pixels- Returns:
- point with given offset horizontally to middle point on right edge
-
right
create a region right of the right side with same height. the new region extends to the right screen border
use grow() to include the current region- Returns:
- the new region
-
right
create a region right of the right side with same height and given width. negative width creates the right part with width inside the region
use grow() to include the current region- Parameters:
width- pixels- Returns:
- the new region
-
leftAt
- Returns:
- point middle on left edge
-
leftAt
negative offset goes to the left
might be off current screen- Parameters:
offset- pixels- Returns:
- point with given offset horizontally to middle point on left edge
-
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- Returns:
- the new region
-
left
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- Parameters:
width- pixels- Returns:
- the new region
-
aboveAt
- Returns:
- point middle on top edge
-
aboveAt
negative offset goes towards top of screen
might be off current screen- Parameters:
offset- pixels- Returns:
- point with given offset vertically to middle point on top edge
-
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- Returns:
- the new region
-
above
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- Parameters:
height- pixels- Returns:
- the new region
-
belowAt
- Returns:
- point middle on bottom edge
-
belowAt
positive offset goes towards bottom of screen
might be off current screen- Parameters:
offset- pixels- Returns:
- point with given offset vertically to middle point on bottom edge
-
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- Returns:
- the new region
-
below
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- Parameters:
height- pixels- Returns:
- the new region
-
union
create a new region containing both regions- Parameters:
ur- region to unite with- Returns:
- the new region
-
intersection
create a region that is the intersection of the given regions- Parameters:
ir- the region to intersect with like AWT Rectangle API- Returns:
- the new region
-
getInset
-
get
-
getRectangle
-
setRows
store info: this region is divided vertically into n even rows
a preparation for using getRow()- Parameters:
n- number of rows- Returns:
- the top row
-
setCols
store info: this region is divided horizontally into n even columns
a preparation for using getCol()- Parameters:
n- number of columns- Returns:
- the leftmost column
-
getRows
public int getRows()- Returns:
- the number of rows or null
-
getRowH
public int getRowH()- Returns:
- the row height or 0
-
getCols
public int getCols()- Returns:
- the number of columns or 0
-
getColW
public int getColW()- Returns:
- the columnwidth or 0
-
isRasterValid
public boolean isRasterValid()Can be used to check, wether the Region currently has a valid raster- Returns:
- true if it has a valid raster (either getCols or getRows or both would return > 0) false otherwise
-
setRaster
store info: this region is divided into a raster of even cells
a preparation for using getCell()
adjusted to a minimum cell size of 5 x 5 pixels- Parameters:
r- number of rowsc- number of columns- Returns:
- the topleft cell
-
getRow
get the specified row counting from 0
negative counts reverse from the end (last is -1)
values outside range are 0 or last respectively- Parameters:
r- row number- Returns:
- the row as new region or the region itself, if no rows are setup
-
getRow
-
getCol
get the specified column counting from 0
negative counts reverse from the end (last is -1)
values outside range are 0 or last respectively- Parameters:
c- column number- Returns:
- the column as new region or the region itself, if no columns are setup
-
getCol
divide the region in n columns and select column c as new Region- Parameters:
c- the column to select counting from 0 or negative to count from the endn- how many columns to devide in- Returns:
- the selected part or the region itself, if parameters are invalid
-
getCell
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- Parameters:
r- row numberc- column number- Returns:
- the cell as new region or the region itself, if no raster is setup
-
highlight4py
INTERNAL: highlight (for Python support):all act on the related Region () - on/off, (int) - int seconds (String) - on/off with given color (int,String) - int seconds with given color (float), (float,String) - same as int
- Parameters:
args- valuaes as above- Returns:
- this
-
internalUseOnlyHighlightReset
public void internalUseOnlyHighlightReset()INTERNAL USE ONLY -
highlightAllOff
public static void highlightAllOff()Switch off all actual highlights -
highlightOn
Switch on the regions highlight with default color- Returns:
- this Region
-
highlightOn
Switch on the regions highlight with given color- Parameters:
color- Color of frame (see method highlight(color))- Returns:
- this Region
-
highlightOff
Switch off the regions highlight- Returns:
- this Region
-
highlight
show a colored frame around the region for a given time or switch on/off() or (color) switch on/off with color (default red)
(number) or (number, color) show in color (default red) for number seconds (cut to int)
- Returns:
- this region
-
highlight
Toggle the regions Highlight border (given 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)- Parameters:
color- Color of frame- Returns:
- the region itself
-
highlight
show the regions Highlight for the given time in seconds (red frame) if 0 - use the global Settings.SlowMotionDelay- Parameters:
secs- time in seconds- Returns:
- the region itself
-
highlight
show the regions Highlight for the given time in seconds (frame of specified color) if 0 - use the global Settings.SlowMotionDelay- Parameters:
secs- time in secondscolor- Color of frame (see method highlight(color))- Returns:
- the region itself
-
wait
public void wait(double timeout)WARNING: wait(long timeout) is taken by Java Object as final. This method catches any interruptedExceptions- Parameters:
timeout- The time to wait
-
wait
Waits for the Pattern, String or Image to appear or timeout (in second) is passed- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- The target to search fortimeout- Timeout in seconds- Returns:
- The found Match
- Throws:
FindFailed- if the Find operation finally failed
-
wait
Waits for the Pattern, String or Image to appear until the AutoWaitTimeout value is exceeded.- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- The target to search for- Returns:
- The found Match
- Throws:
FindFailed- if the Find operation finally failed
-
find
finds the given Pattern, String or Image in the region and returns the best match.- Overrides:
findin classElement- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- what (PSI) to find- Returns:
- If found, the element. null otherwise
- Throws:
FindFailed- if the Find operation failed
-
exists
Check if target exists with a specified timeout
timout = 0: returns immediately after first search, does not raise FindFailed- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- The target to search fortimeout- Timeout in seconds- Returns:
- the match (null if not found or image file missing)
-
exists
Check if target exists (with the default autoWaitTimeout), does not raise FindFailed- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- Pattern, String or Image- Returns:
- the match (null if not found or image file missing)
-
has
public <PSI> boolean has(PSI target)Check if target exists
- does not raise FindFailed - like exists(target, 0) but returns true/false
- which means only one search
- no wait for target to appear
- intended to be used in logical expressions
- use getLastMatch() to get the match if found- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- Pattern, String or Image- Returns:
- true if found, false otherwise
-
has
public <PSI> boolean has(PSI target, double timeout)Check if target appears within the specified time
- does not raise FindFailed - like exists(target, timeout) but returns true/false
- intended to be used in logical expressions
- use getLastMatch() to get the match if found- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- The target to search fortimeout- Timeout in seconds- Returns:
- true if found, false otherwise
-
waitVanish
public <PSI> boolean waitVanish(PSI target, double timeout)waits until target vanishes or timeout (in seconds) is passed- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- Pattern, String or Imagetimeout- time in seconds- Returns:
- true if target vanishes, false otherwise and if imagefile is missing.
-
waitVanish
public <PSI> boolean waitVanish(PSI target)waits until target vanishes or timeout (in seconds) is passed (AutoWaitTimeout)- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- The target to wait for it to vanish- Returns:
- true if the target vanishes, otherwise returns false.
-
findAll
finds all occurences of the given Pattern, String or Image in the region and returns an Iterator of Matches.- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- A search criteria- Returns:
- All elements matching
- Throws:
FindFailed- if the Find operation failed
-
getAll
-
unionAll
-
findAllList
-
findAllByRow
-
findAllByColumn
-
findBest
-
findBestList
-
findAny
-
findAnyList
-
unionAny
-
unionAnyList
-
waitText
- Throws:
FindFailed
-
waitText
- Throws:
FindFailed
-
waitT
- Throws:
FindFailed
-
waitT
- Throws:
FindFailed
-
findText
- Overrides:
findTextin classElement- Throws:
FindFailed
-
existsText
-
existsText
- Overrides:
existsTextin classElement
-
hasText
-
findAllText
- Overrides:
findAllTextin classElement
-
relocate
-
relocate
-
getLocationFromTarget
- Throws:
FindFailed
-
getObserver
-
hasObserver
public boolean hasObserver()evaluate if at least one event observer is defined for this region (the observer need not be running)- Returns:
- true, if the region has an observer with event observers
-
isObserving
public boolean isObserving()- Returns:
- true if an observer is running for this region
-
hasEvents
public boolean hasEvents()- Returns:
- true if any events have happened for this region, false otherwise
-
getEvents
the region's events are removed from the list- Returns:
- the region's happened events as array if any (size might be 0)
-
getEvent
the event is removed from the list- Parameters:
name- event's name- Returns:
- the named event if happened otherwise null
-
setInactive
set the observer with the given name inactive (not checked while observing)- Parameters:
name- observers name
-
setActive
set the observer with the given name active (checked while observing)- Parameters:
name- observers name
-
onAppear
a subsequently started observer in this region should wait for target and notify the given observer about this event
for details about the observe event handler:ObserverCallBack
for details about APPEAR/VANISH/CHANGE events:ObserveEvent- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- Pattern, String or Imageobserver- ObserverCallBack- Returns:
- the event's name
-
onAppear
a subsequently started observer in this region should wait for target success and details about the event can be obtained using @{link Observing}
for details about APPEAR/VANISH/CHANGE events:ObserveEvent- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- Pattern, String or Image- Returns:
- the event's name
-
onVanish
a subsequently started observer in this region should wait for the target to vanish and notify the given observer about this event
for details about the observe event handler:ObserverCallBack
for details about APPEAR/VANISH/CHANGE events:ObserveEvent- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- Pattern, String or Imageobserver- ObserverCallBack- Returns:
- the event's name
-
onVanish
a subsequently started observer in this region should wait for the target to vanish success and details about the event can be obtained using @{link Observing}
for details about APPEAR/VANISH/CHANGE events:ObserveEvent- Type Parameters:
PSI- Pattern, String or Image- Parameters:
target- Pattern, String or Image- Returns:
- the event's name
-
onChange
a subsequently started observer in this region should wait for changes in the region and notify the given observer about this event for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEvent- Parameters:
threshold- minimum size of changes (rectangle threshhold x threshold)observer- ObserverCallBack- Returns:
- the event's name
-
onChange
a subsequently started observer in this region should wait for changes in the region success and details about the event can be obtained using @{link Observing}
for details about APPEAR/VANISH/CHANGE events:ObserveEvent- Parameters:
threshold- minimum size of changes (rectangle threshhold x threshold)- Returns:
- the event's name
-
onChange
a subsequently started observer in this region should wait for changes in the region and notify the given observer about this event
minimum size of changes used: Settings.ObserveMinChangedPixels for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEvent- Parameters:
observer- ObserverCallBack- Returns:
- the event's name
-
onChange
a subsequently started observer in this region should wait for changes in the region success and details about the event can be obtained using @{link Observing}
minimum size of changes used: Settings.ObserveMinChangedPixels for details about APPEAR/VANISH/CHANGE events:ObserveEvent- Returns:
- the event's name
-
onChangeDo
-
observe
public boolean observe()start an observer in this region that runs forever (use stopObserving() in handler) for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEvent- Returns:
- false if not possible, true if events have happened
-
observe
public boolean observe(double secs)start an observer in this region for the given time for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEvent- Parameters:
secs- time in seconds the observer should run- Returns:
- false if not possible, true if events have happened
-
observeInLine
public boolean observeInLine(double secs)INTERNAL USE ONLY: for use with scripting API bridges- Parameters:
secs- time in seconds the observer should run- Returns:
- false if not possible, true if events have happened
-
observeInBackground
public boolean observeInBackground(double secs)start an observer in this region for the given time that runs in background - for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEvent- Parameters:
secs- time in seconds the observer should run- Returns:
- false if not possible, true otherwise
-
observeInBackground
public boolean observeInBackground()start an observer in this region that runs in background forever - for details about the observe event handler:ObserverCallBackfor details about APPEAR/VANISH/CHANGE events:ObserveEvent- Returns:
- false if not possible, true otherwise
-
stopObserver
public void stopObserver()stops a running observer -
stopObserver
stops a running observer printing an info message- Parameters:
message- text
-
checkMatch
-
hover
public int hover()move the mouse pointer to region's last successful match
use center if no lastMatch
if region is a match: move to targetOffset
same as mouseMove- Returns:
- 1 if possible, 0 otherwise
-
hover
move the mouse pointer to the given target location
same as mouseMove
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point- Type Parameters:
PFRML- to search: Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Location- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- for Pattern or Filename
-
click
public int click()left click at the region's last successful match
use center if no lastMatch
if region is a match: click targetOffset- Returns:
- 1 if possible, 0 otherwise
-
click
left click at the given target location
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point- Type Parameters:
PFRML- to search: Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Location- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- for Pattern or Filename
-
click
left click at the given target location
holding down the given modifier keys
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point- Type Parameters:
PFRML- to search: Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationmodifiers- the value of the resulting bitmask (see KeyModifier)- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- for Pattern or Filename
-
doubleClick
public int doubleClick()double click at the region's last successful match
use center if no lastMatch
if region is a match: click targetOffset- Returns:
- 1 if possible, 0 otherwise
-
doubleClick
double click at the given target location
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Location- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- for Pattern or Filename
-
doubleClick
double click at the given target location
holding down the given modifier keys
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationmodifiers- the value of the resulting bitmask (see KeyModifier)- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- for Pattern or Filename
-
rightClick
public int rightClick()right click at the region's last successful match
use center if no lastMatch
if region is a match: click targetOffset- Returns:
- 1 if possible, 0 otherwise
-
rightClick
right click at the given target location
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Location- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- for Pattern or Filename
-
rightClick
right click at the given target location
holding down the given modifier keys
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationmodifiers- the value of the resulting bitmask (see KeyModifier)- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- for Pattern or Filename
-
delayClick
public void delayClick(int millisecs)time in milliseconds to delay between button down/up at next click only (max 1000)- Parameters:
millisecs- value
-
dragDrop
Drag from region's last match and drop at given target
applying Settings.DelayAfterDrag and DelayBeforeDrop
using left mouse button- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Location- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if the Find operation failed
-
dragDrop
Drag from a position and drop to another using left mouse button
applying Settings.DelayAfterDrag and DelayBeforeDrop- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
t1- source positiont2- destination position- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if the Find operation failed
-
drag
Prepare a drag action: move mouse to given target
press and hold left mouse button
wait Settings.DelayAfterDrag- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Location- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if not found
-
dropAt
finalize a drag action with a drop: move mouse to given target
wait Settings.DelayBeforeDrop
before releasing the left mouse button- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Location- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if not found
-
mouseDown
public void mouseDown(int buttons)press and hold the specified buttons - use + to combine Button.LEFT left mouse button Button.MIDDLE middle mouse button Button.RIGHT right mouse button- Parameters:
buttons- spec
-
mouseUp
public void mouseUp()release all currently held buttons -
mouseUp
public void mouseUp(int buttons)release the specified mouse buttons (see mouseDown) if buttons==0, all currently held buttons are released- Parameters:
buttons- spec
-
mouseMove
public int mouseMove()move the mouse pointer to the region's last successful match
same as hover- Returns:
- 1 if possible, 0 otherwise
-
mouseMove
move the mouse pointer to the given target location
same as hover
Pattern or Filename - do a find before and use the match
Region - position at center
Match - position at match's targetOffset
Location - position at that point- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Location- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- for Pattern or Filename
-
mouseMove
public int mouseMove(int xoff, int yoff)move the mouse from the current position to the offset position given by the parameters- Parameters:
xoff- horizontal offset (< 0 left, > 0 right)yoff- vertical offset (< 0 up, > 0 down)- Returns:
- 1 if possible, 0 otherwise
-
wheel
public int wheel(int direction, int steps)Move the wheel at the current mouse position
the given steps in the given direction:
Button.WHEEL_DOWN, Button.WHEEL_UP- Parameters:
direction- to move the wheelsteps- the number of steps- Returns:
- 1 in any case
-
wheel
move the mouse pointer to the given target location
and move the wheel the given steps in the given direction:
Button.WHEEL_DOWN, Button.WHEEL_UP- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location target- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationdirection- to move the wheelsteps- the number of steps- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if the Find operation failed
-
wheel
move the mouse pointer to the given target location
and move the wheel the given steps in the given direction:
Button.WHEEL_DOWN, Button.WHEEL_UP- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location target- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationdirection- to move the wheelsteps- the number of stepsstepDelay- number of miliseconds to wait when incrementing the step value- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if the Find operation failed
-
atMouse
Deprecated.useMouse.at()instead- Returns:
- current location of mouse pointer
-
keyDown
public void keyDown(int keycode)press and hold the given key use a constant from java.awt.event.KeyEvent which might be special in the current machine/system environment- Parameters:
keycode- Java KeyCode
-
keyDown
press and hold the given keys including modifier keys
use the key constants defined in class Key,
which only provides a subset of a US-QWERTY PC keyboard layout
might be mixed with simple characters
use + to concatenate Key constants- Parameters:
keys- valid keys
-
keyUp
public void keyUp()release all currently pressed keys -
keyUp
public void keyUp(int keycode)release the given keys (see keyDown(keycode) )- Parameters:
keycode- Java KeyCode
-
keyUp
release the given keys (see keyDown(keys) )- Parameters:
keys- valid keys
-
write
Compact alternative for type() with more options
- special keys and options are coded as #XN. or #X+ or #X-
where X is a refrence for a special key and N is an optional repeat factor
A modifier key as #X. modifies the next following key
the trailing . ends the special key, the + (press and hold) or - (release) does the same,
but signals press-and-hold or release additionally.
except #W / #w all special keys are not case-sensitive
a #wn. inserts a wait of n millisecs or n secs if n less than 60
a #Wn. sets the type delay for the following keys (must be > 60 and denotes millisecs) - otherwise taken as normal wait
Example: wait 2 secs then type CMD/CTRL - N then wait 1 sec then type DOWN 3 times
Windows/Linux: write("#w2.#C.n#W1.#d3.")
Mac: write("#w2.#M.n#W1.#D3.")
for more details about the special key codes and examples consult the docs- Parameters:
text- a coded text interpreted as a series of key actions (press/hold/release)- Returns:
- 0 for success 1 otherwise
-
type
enters the given text one character/key after another using keyDown/keyUp
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout
the text is entered at the current position of the focus/carret- Parameters:
text- containing characters and/or Key constants- Returns:
- 1 if possible, 0 otherwise
-
type
enters the given text one character/key after another using keyDown/keyUp
while holding down the given modifier keys
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout
the text is entered at the current position of the focus/carret- Parameters:
text- containing characters and/or Key constantsmodifiers- constants according to class KeyModifiers- Returns:
- 1 if possible, 0 otherwise
-
type
enters the given text one character/key after another usingkeyDown/keyUp
while holding down the given modifier keys
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout
the text is entered at the current position of the focus/carret- Parameters:
text- containing characters and/or Key constantsmodifiers- constants according to class Key - combine using +- Returns:
- 1 if possible, 0 otherwise
-
type
first does a click(target) at the given target position to gain focus/carret
enters the given text one character/key after another using keyDown/keyUp
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationtext- containing characters and/or Key constants- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if not found
-
type
first does a click(target) at the given target position to gain focus/carret
enters the given text one character/key after another using keyDown/keyUp
while holding down the given modifier keys
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationtext- containing characters and/or Key constantsmodifiers- constants according to class KeyModifiers- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if not found
-
type
first does a click(target) at the given target position to gain focus/carret
enters the given text one character/key after another using keyDown/keyUp
while holding down the given modifier keys
about the usable Key constants see keyDown(keys)
Class Key only provides a subset of a US-QWERTY PC keyboard layout- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationtext- containing characters and/or Key constantsmodifiers- constants according to class Key - combine using +- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if not found
-
delayType
public void delayType(int millisecs)time in milliseconds to delay between each character at next type only (max 1000)- Parameters:
millisecs- value
-
paste
pastes the text at the current position of the focus/carret
using the clipboard and strg/ctrl/cmd-v (paste keyboard shortcut)- Parameters:
text- a string, which might contain unicode characters- Returns:
- 0 if possible, 1 otherwise
-
paste
first does a click(target) at the given target position to gain focus/carret
and then pastes the text
using the clipboard and strg/ctrl/cmd-v (paste keyboard shortcut)- Type Parameters:
PFRML- Pattern, Filename, Text, Region, Match or Location target- Parameters:
target- Pattern, Filename, Text, Region, Match or Locationtext- a string, which might contain unicode characters- Returns:
- 1 if possible, 0 otherwise
- Throws:
FindFailed- if not found
-
aTap
- Throws:
FindFailed
-
aInput
-
aKey
public void aKey(int key) -
aSwipe
- Throws:
FindFailed
-
aSwipeUp
public void aSwipeUp() -
aSwipeDown
public void aSwipeDown() -
aSwipeLeft
public void aSwipeLeft() -
aSwipeRight
public void aSwipeRight()
-