← Back to team overview

sikuli-driver team mailing list archive

[Question #247086]: Text Recognition and then addition

 

New question #247086 on Sikuli:
https://answers.launchpad.net/sikuli/+question/247086

Hi Guys,

Very easy question as I am  a newbie programmer.

I am using the code below to read a number.

--------
import time
Settings.OcrTextRead = True
r = Region(1258,146,38,24)
text = r.text()

print text
----------

it print the number 100. To do maths with this number I am trying the following:

a = 1
b = a + text

but when I try this, it gives me an error. So I think I will need to convert the string 100 to a number 100. Not sure how to do this...any comments or suggestions would be very welcome. 

Thank you.



-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.