sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #33756
Re: [Question #269311]: compare directory of pictures to screen with loop
Question #269311 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/269311
jhonvinage475 gave more information on the question:
better work but don't make good image recognition delete the wrong :
# collect the image files (import os not needed in Sikuli IDE)
dir = "D:\\stockage\\brush\\new\\original\\images\\new\\"
images = [] # to store the filenames
for e in os.listdir(dir): # this starts the loop
if not e.endswith(".png"): continue
images.append(os.path.join(dir, e)) # collect
# declare variables
img1="photoshop.png"
# loop for image in directory and delete in the panel software
for e in images:
wait(0.5)
type(Key.PAGE_DOWN)
wait(0.5)
if exists(Pattern(e).similar(0.99)):
rightClick(Pattern(e).similar(0.99))
# wait(0.5)
click(Pattern(img1).similar(0.99))
type(Key.PAGE_DOWN)
else:
wait(0.5)
type(Key.HOME)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.