sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #52207
Re: [Question #682258]: I want to make "if" statement inside the first "if" statement and it just didn't detect anything from condition. Help.
Question #682258 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682258
Status: Open => Answered
Manfred Hampl proposed the following answer:
The expression
Region(722,262,91,117).exists("Idle.png" or Pattern("cautionwarning.png").similar(0.50), 0.5)
is invalid.
exists(...) needs a pattern object, or a string as first paramater.
Your text "Idle.png" or Pattern("cautionwarning.png").similar(0.50)
is neither a pattern object, nor a string, but a logical expression.
You need to formulate it differently, probably something like
if Region(722,262,91,117).has("Idle.png", 0.5) or
Region(722,262,91,117).has(Pattern("cautionwarning.png").similar(0.50),
0.5):
see also https://sikulix-2014.readthedocs.io/en/latest/region.html
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.