← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #194798]: Rogue enter command after printing text from a captured region

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
The "Enter-Command" is a newline character, that is appended to your
text read from the region by the reg.text() (this is one of the many
oddities of the current version of the OCR feature).

To get rid of it:
myText = reg.text().strip()

the string function strip() removes all leading and trailing whitespace
characters.

BTW: the first wait(2) is not needed

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