sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #04953
Re: [Question #169664]: picture cross refencing/genral coding
Question #169664 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/169664
Status: Open => Answered
RaiMan proposed the following answer:
Supposing, that all your imagexxx.png are stored somewhere in a folder,
you might loop through the images until you find a match.
--- quick and dirty
# to get the find code out of way
def compareImage(probe, base):
# here goes your code to find probe in base
if found: return True
return False
import os
dir = "absolute-path-to-your-folder-containing-the-images"
files = os.listdir(dir)
probe = "cool.png"
for f in files:
image = os.path.join(dir, f)
if compareImage(probe, image): break
image = "none of them"
print "found in", image
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.