sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #49581
Re: [Question #676619]: Getting text(date) from image that changes everyday
Question #676619 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/676619
monicar posted a new comment:
Thanks Raiman. Working as expected with offset.
On Wed, Dec 5, 2018, 10:56 AM RaiMan <question676619@xxxxxxxxxxxxxxxxxxxxx
wrote:
> Your question #676619 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/676619
>
> Status: Open => Answered
>
> RaiMan proposed the following answer:
> --- general comment
> screen.wait(txtImage, 10);
> String extractText = screen.find(txtImage).text();
>
> This does not really make sense:
> Match theText = screen.wait(txtImage, 10); // gives the region
> of the image
> String extractText = theText.text();
>
> or even shorter:
> String extractText = screen.wait(txtImage, 10).text()
>
> --- your problem
> As I understand, the region on the screen of the found txtImage contains
> the text you want to read and this area changes.
>
> --- how to:
> - find some image near the text region, that does not change.
> - define the region with the text relative to this match
> - read the text from this region
>
> meta code:
> ref = find(someReferenceImage)
> textRegion = ref.offset(x, y).grow(....) // x, y and ... have to be
> evaluated manually
> txt = textRegion.text()
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/676619/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/676619
>
> You received this question notification because you asked the question.
>
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.