Nothing to observe (Region might be invalid)

Asked by Shekhar on 2017-08-06

I am trying to write a script to alert me to a change on a screen.

R = Region(570,220,160,70)
R.observe()
onChange(10,testfunc)

No matter how many different region parameters i try, it is giving me the following error:

[error] Region: observe: Nothing to observe (Region might be invalid): R[570,220 160x70]@S(0)

Can anyone help me understand what's causing the error and how to fix it please?

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Shekhar
Solved:
2017-08-06
Last query:
2017-08-06
Last reply:
2017-08-06
masuo (masuo-ohara) said : #1

Try this codes.

R = Region(570,220,160,70)
R.onChange(10,testfunc) # <--- Add Resion
R.observe(5) # <--- Move after onChange()

Shekhar (shekharpr10015) said : #2

Thank you. Problem solved :-)