I'm using Sikulix IDE v2.0.5 and trying to search on the screen a specific word, then look at his right if there is another specific word.
I saw that I should use setThrowException(False)
to Skip the FindFailed Exception, but when implementing it I still get them thrown.
[error] FindFailed ( 1642158588596.png: (74x10) seen at (443, 190) with 1,00 in R[517,190 300x10]@S(0) )
[error] --- Traceback --- error source first
line: module ( function ) statement
6: main ( <module> ) if link.right(300).find("1642158588596.png"):
[error] --- Traceback --- end --------------
Looks like SCREEN.setThrowException(False)
wasn't taken into account after using Region's right()
function.
For it to work I needed to set the exception on the new Region returned by right()
:
for word in words:
word = word.right(300)
word.setThrowException(False)
...