findAll(Pattern("excel_icon.png").similar(0.9))
nn = getLastMatches()
print "nn -> ",list(nn)
while nn.hasNext():
print "excel --> ",nn.next()
以上是代码。在这里,我尝试在桌面上找到所有的MS excel图标,然后将其一一打印出来。当我运行它时,在 sikuli 的消息框中只能看到第 3 行代码的输出,并且没有打印第 5 行。输出:-
nn -> [Match[470,936 53x56 score=0.98 target=center], Match[394,936 53x56 score=0.98 target=center]
但是,当我在第三行替换list(nn)
为nn
print "nn -> ",nn
我得到的输出是: -
nn -> org.sikuli.script.Finder@4b0431
excel --> Match[470,936 53x56 score=0.98 target=center]
excel --> Match[394,936 53x56 score=0.98 target=center]
我很困惑为什么当我在第 3 行使用 line() 时它没有打印第 5 行。谁能帮帮我??