Question #148363 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/148363
eliteSKL posted a new comment: i found out during debugging that you where missing an "else:" in the second from bottom line. it works great though. def unfocus(obj, sim=0.7, reg=SCREEN): to = Location(0,0) if obj.__class__.__name__ == "Pattern": to = obj.getTargetOffset() for i in range(4): if reg.exists(Pattern(obj).similar(sim).targetOffset(to.x, to.y),0): return reg.getLastMatch() sim -= 0.1 else: return false -- You received this question notification because you are a member of Sikuli Drivers, which is an answer contact for Sikuli. _______________________________________________ Mailing list: https://launchpad.net/~sikuli-driver Post to : [email protected] Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp

