Question #241861 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/241861

    Status: Open => Answered

RaiMan proposed the following answer:
Version 1.0.1 has a bug, that allows to use Pattern(someBufferedImage),
but the find does not work and simply says "not found".

This will be fixed in version 1.1.0

For now, you have to use:
Pattern pattern = new Pattern(screen.capture(50, 50, 300, 300).getFile());
Match m = screen.exists(pattern,0);

or simply:
String img = screen.capture(50, 50, 300, 300).getFile();
Match m = screen.exists(img,0);

getFile() will store the captured image in a tempfile.

getFile has more options to specify a filename and optionally a folder
to store the image.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to