Package org.sikuli.script
Class Finder
java.lang.Object
org.sikuli.script.Finder
public class Finder extends Object implements Iterator<Match>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classFinder.Finder2 -
Constructor Summary
Constructors Modifier Constructor Description protectedFinder()Finder(ScreenImage simg, Region region)Finder for a Region on a ScreenImageFinder(RIBS inWhat)Create a Finder for the given element -
Method Summary
Modifier and Type Method Description voiddestroy()Stringfind(BufferedImage img)do a find op with the given image in the Finder's image (hasNext() and next() will reveal possible match results)Stringfind(String imageOrText)do a find op with the given image or the given text in the Finder's image (hasNext() and next() will reveal possible match results)Stringfind(Image img)do a find op with the given image in the Finder's image (hasNext() and next() will reveal possible match results)Stringfind(Pattern aPtn)do a find op with the given pattern in the Finder's image (hasNext() and next() will reveal possible match results)StringfindAll(String imageOrText)do a findAll op with the given image or the given text in the Finder's image (hasNext() and next() will reveal possible match results)StringfindAll(Image img)do a findAll op with the given image in the Finder's image (hasNext() and next() will reveal possible match results)StringfindAll(Pattern aPtn)do a find op with the given pattern in the Finder's image (hasNext() and next() will reveal possible match results)protected voidfindAllRepeat()internal use: repeat with same FinderStringfindAllText(String text)do a findAll op with the given text in the Finder's image (hasNext() and next() will reveal possible match results)List<Region>findChanges(Object changedImage)booleanfindLine(String text)booleanfindLines()booleanfindLines(String text)protected voidfindRepeat()internal use: repeat with same FinderStringfindText(String text)do a text find with the given text in the Finder's image (hasNext() and next() will reveal possible match results)booleanfindWord(String text)booleanfindWords()booleanfindWords(String text)List<Match>getList()<RI> List<Match>getListFor(RI what)booleanhasNext()Matchnext()voidremove()protected voidsetRepeating()internal use: to be able to reuse the same Finderprotected voidsetScreenImage(ScreenImage simg)
-
Constructor Details
-
Finder
protected Finder() -
Finder
public Finder(RIBS inWhat)Create a Finder for the given element- Type Parameters:
RIBS- Region, Image, BufferedImage or ScreenImage- Parameters:
inWhat- in what element (RIBS) to search
-
Finder
Finder for a Region on a ScreenImage- Parameters:
simg- ScreenImageregion- the cropping region
-
-
Method Details
-
setScreenImage
-
setRepeating
protected void setRepeating()internal use: to be able to reuse the same Finder -
findRepeat
protected void findRepeat()internal use: repeat with same Finder -
findAllRepeat
protected void findAllRepeat()internal use: repeat with same Finder -
find
do a find op with the given image or the given text in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
imageOrText- image file name or text- Returns:
- null. if find setup not possible
-
find
do a find op with the given pattern in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
aPtn- Pattern- Returns:
- null. if find setup not possible
-
find
do a find op with the given image in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
img- Image- Returns:
- null. if find setup not possible
-
find
do a find op with the given image in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
img- BufferedImage- Returns:
- null. if find setup not possible
-
findChanges
-
findAll
do a findAll op with the given image or the given text in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
imageOrText- iamge file name or text- Returns:
- null. if find setup not possible
-
findAll
do a find op with the given pattern in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
aPtn- Pattern- Returns:
- null. if find setup not possible
-
findAll
do a findAll op with the given image in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
img- Image- Returns:
- null. if find setup not possible
-
findText
do a text find with the given text in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
text- text- Returns:
- null. if find setup not possible
-
findWord
-
findWords
-
findWords
public boolean findWords() -
findLine
-
findLines
-
findLines
public boolean findLines() -
findAllText
do a findAll op with the given text in the Finder's image (hasNext() and next() will reveal possible match results)- Parameters:
text- text- Returns:
- null. if find setup not possible
-
getList
-
getListFor
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
destroy
public void destroy()
-