← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #246501]: How to make sikuli find image for a new search?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
when using
click(some_image)

where some_image either is a string containing a valid image file name
or a variable containing a string containing a valid image file name,
then in all cases a new search is done.

Only if you intentionally use the result of a previous find or the
region's last match, then this location on the screen is used

match = find(some_image)
for i in range(3):
    click(match)

or this
click(some_image)
match = getLastMatch()
for i in range(3):
    click(match)

will always click the same location match, since the find is not
repeated intentionally.

To get better help, you should paste your real code.

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