← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #680194]: OCR number reading works but how to put in conditions?

 

Question #680194 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680194

    Status: Answered => Open

MP is still having a problem:
Ah yes silly me, I am learning python and sikulix at the same time. It
is going pretty well imo. :)

============================
tr = TextOCR.start()
tr.setPSM(6)
r = Region(1056,315,26,26)
OCRnumber = r.text()

print OCRnumber #just to check and compare the number with my own eyes

if OCRnumber == 1:
    print 1
else:
    print 2

===========

I always get 2 as a result. Does this mean the text() is not an integer?
I dont understand why he doesnt print 1. The OCRnumber is the number 1

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.