sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #51721
Re: [Question #680864]: how to find list[] and if find remove the target
Question #680864 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680864
Status: Needs information => Open
wu gave more information on the question:
the similar question is slove now have another question there is my
code::
tch = []
for i in range(1,13):
tch.append(Pattern("source/tch/"+str(i)+'.png').similar(0.60))
paste(line) --->html
wait(1)
type(Key.ENTER) -->type the screen will go into html and the page will loading the loading time will 1-3sec
count = 0
temp = []
while True:
m = findAnyList(tch) -->return the image.similar(0.60) ?! i don't know there is will return thist or another
for image in m : --> if the image onAppear the loading page do screenshot
screenshot_im = Screen(0).capture().getFile()
shutil.move(screenshot_im, os.path.join(imageSave, 'change_'+ str(count) + '.png'))
# shot = Screen(0).capture()
# shotFile = 'change_%d-%d.png' % (count)
# shutil.move(shot.getFile(), os.path.join(imageSave, shotFile))
ix = image.getIndex()
print(ix)
tch.remove(tch[ix]) --->remove the image is already onappear
if len(tch) ==0:
break
count = count +1
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.