with Region non working properly

Asked by Danielo

I'm wondering why this code does not work:

CenterScreen = Region(423,178,1165,377)

def findInRegion():
    with CenterScreen:
        if exists(barras[1]) or exists(barras[1]) :
            return getLastMatch()
    return False

Instead of using the specified region it uses the implicit SCREEN region.
In my experience the with clause has never worked fine.

Regards

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

What version of Sikuli(X)?

Revision history for this message
Danielo (rdanielo-gmail) said :
#2

I re-download it yesterday, so I hope it is the latest :)
Stable, not nightly
El 10/6/2016 7:43 a. m., "RaiMan" <email address hidden>
escribió:

> Your question #295114 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/295114
>
> Status: Open => Needs information
>
> RaiMan requested more information:
> What version of Sikuli(X)?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/sikuli/+question/295114
>
> You received this question notification because you asked the question.
>

Revision history for this message
RaiMan (raimund-hocke) said :
#3

made it a bug.

Revision history for this message
Danielo (rdanielo-gmail) said :
#4

Hello RaiMan,

Were you able to reproduce it?

Revision history for this message
RaiMan (raimund-hocke) said :
#5

You might have already got the bug note.

I think I finally fixed it:
appreciated if you test it after tomorrow