sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #54243
Re: [Question #688992]: Number recognition
Question #688992 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688992
Status: Open => Answered
Manfred Hampl proposed the following answer:
region.text() returns a string. If you want to compare that with a
number, you have to convert the string to a number first.
myValue = int(region.text())
if myValue < 1000:
#do this
else:
#do that
(Remark, if region.text returns a non-numeric string, then int(...) will
fail with ValueError unless you put it into a try - except.)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.