org.sikuli.script
Class Finder

java.lang.Object
  extended by org.sikuli.script.Finder
All Implemented Interfaces:
Iterator<Match>

public class Finder
extends Object
implements Iterator<Match>


Constructor Summary
Finder(ScreenImage img, Region region)
          Finder constructor (finding within the given region).
Finder(String screenFilename)
          Finder constructor (finding within the desktop screen).
Finder(String screenFilename, Region region)
          Finder constructor (finding within the given region).
 
Method Summary
 void __del__()
           
 Finder __enter__()
           
 void __exit__(Object type, Object value, Object trackback)
           
 void destroy()
           
protected  void finalize()
           
<PSC> void
find(PSC ptn)
          void find( Pattern/String/PatternClass ) finds the given pattern in the given ScreenImage.
 void find(String templateFilename, double minSimilarity)
           
<PSC> void
findAll(PSC ptn)
           
 void findAll(String templateFilename, double minSimilarity)
           
protected  String findImageFile(String file)
           
 boolean hasNext()
           
 Match next()
           
 void remove()
           
protected
<PSC> void
setFindInput(PSC ptn)
           
protected  void setTargetSmartly(org.sikuli.script.natives.FindInput fin, String target)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Finder

public Finder(String screenFilename)
       throws IOException
Finder constructor (finding within the desktop screen).

Throws:
IOException

Finder

public Finder(String screenFilename,
              Region region)
       throws IOException
Finder constructor (finding within the given region).

Throws:
IOException

Finder

public Finder(ScreenImage img,
              Region region)
Finder constructor (finding within the given region).

Method Detail

__enter__

public Finder __enter__()

__exit__

public void __exit__(Object type,
                     Object value,
                     Object trackback)

__del__

public void __del__()

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

findImageFile

protected String findImageFile(String file)
                        throws IOException
Throws:
IOException

setFindInput

protected <PSC> void setFindInput(PSC ptn)
                     throws IOException
Throws:
IOException

setTargetSmartly

protected void setTargetSmartly(org.sikuli.script.natives.FindInput fin,
                                String target)

find

public <PSC> void find(PSC ptn)
          throws IOException
void find( Pattern/String/PatternClass ) finds the given pattern in the given ScreenImage.

Throws:
IOException

find

public void find(String templateFilename,
                 double minSimilarity)
          throws IOException
Throws:
IOException

findAll

public <PSC> void findAll(PSC ptn)
             throws IOException
Throws:
IOException

findAll

public void findAll(String templateFilename,
                    double minSimilarity)
             throws IOException
Throws:
IOException

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Match>

next

public Match next()
Specified by:
next in interface Iterator<Match>

remove

public void remove()
Specified by:
remove in interface Iterator<Match>

destroy

public void destroy()