← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245984]: VDict() broken on Mac?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Ok, interesting approach and usage of VDict.

images = [... some listed images ...]

changed = capture(changedRegion)
finderChanged = Finder(changed)
nImg = -1
for img in images:
    nImg += 1
    finderChanged.find(img)
    if finderChanged.hasNext(): break

# nImg contains the number of the image in the list

You might do it similar with a dictionary and finally get the matched
images key, go go on with.

With this solution the listed images must be smaller (contained in the
captured region) than the changedRegion.

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