Package org.sikuli.script
Class Finder
- java.lang.Object
-
- org.sikuli.script.Finder
-
-
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
All Methods Instance Methods Concrete Methods 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()voidresetFindChanges()voidsetFindChangesImageDiff(int value)voidsetFindChangesPixelDiff(int value)protected voidsetRepeating()internal use: to be able to reuse the same Finderprotected voidsetScreenImage(ScreenImage simg)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
Finder
protected Finder()
-
Finder
public Finder(RIBS inWhat)
Create a Finder for the given element- Type Parameters:
RIBS- Region, Image, BufferedImage, ScreenImage or image filename- Parameters:
inWhat- in what element (RIBS) to search
-
Finder
public Finder(ScreenImage simg, Region region)
Finder for a Region on a ScreenImage- Parameters:
simg- ScreenImageregion- the cropping region
-
-
Method Detail
-
setScreenImage
protected void setScreenImage(ScreenImage simg)
-
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
public String find(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)- Parameters:
imageOrText- image file name or text- Returns:
- null. if find setup not possible
-
find
public String find(Pattern aPtn)
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
public String find(Image img)
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
public String find(BufferedImage img)
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
-
findAll
public String findAll(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)- Parameters:
imageOrText- iamge file name or text- Returns:
- null. if find setup not possible
-
findAll
public String findAll(Pattern aPtn)
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
public String findAll(Image img)
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
public String findText(String text)
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
public boolean findWord(String text)
-
findWords
public boolean findWords(String text)
-
findWords
public boolean findWords()
-
findLine
public boolean findLine(String text)
-
findLines
public boolean findLines(String text)
-
findLines
public boolean findLines()
-
findAllText
public String findAllText(String text)
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
-
hasNext
public boolean hasNext()
-
next
public Match next()
-
destroy
public void destroy()
-
resetFindChanges
public void resetFindChanges()
-
setFindChangesPixelDiff
public void setFindChangesPixelDiff(int value)
-
setFindChangesImageDiff
public void setFindChangesImageDiff(int value)
-
-