sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12107
Re: [Question #204056]: Problem With For loop
Question #204056 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/204056
Status: Open => Answered
RaiMan proposed the following answer:
Each search (explicit like find, exits or implicit like click) store the match with the search region.
So after a search operation you can ask the region, to get the last match e.g. to click on it.
if exists(someImage): click(getLastMatch()) # one search only
instead of
if exists(someImage): click(someImage) # two searches
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.