Re: [Sikuli-driver] [Question #690287]: A complex (OCR issue)

2020-04-28 Thread RaiMan
Question #690287 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690287

Status: Open => Answered

RaiMan proposed the following answer:
Have a look on how to read the lines contained in a file

pyFile = open(...)
for line in pyFile:
if line.strip().startsWith("limit ="):
# eval the line

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #690287]: A complex (OCR issue)

2020-04-28 Thread xyz_User
New question #690287 on Sikuli:
https://answers.launchpad.net/sikuli/+question/690287

Please advise if this is possible. With my current script I'm using the exec 
command to read external py file (with values or function) then executing that 
function from within sikuli.

My quesion is: How can i go about reading the ORC text on an image (This part 
is working fine, reads correct text) THEN compare that to the external py file 
value.

So for eg: my ext py file (limit.py) has the following declaration:

limit = 1000

Sikuli now reads a number on an image via OCR (say 2000)

now I need to execute the following:

if read image (2000) is > 1000 (in the limit.py) file do x

I hope that made sense. Please advise --- The part regarding reading external 
file is a must otherwise this would be easy to implement. Thank you!

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp