OCR number reading works but how to put in conditions?
Asked by
MP
So I am really happy my script works and is reading numbers perfectly. I tested this with "print region.text()". But now I want that if he reads a "1" that he does action 1. I tried the following code but I get the following error:
[error] script [ test_OCR ] stopped with error in line 6 at column 10
[error] SyntaxError ( "mismatched input '=' expecting COLON", )
code:
=======
tr = TextOCR.start()
tr.setPSM(6)
r = Region(
if r.text() = "1":
print "action 1"
else:
print "nothing"
=======
Cheers!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- MP
- Solved:
- Last query:
- Last reply:
To post a message you must log in.