Nothing to observe (Region might be invalid)

Asked by Shekhar

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Shekhar
Solved:
Last query:
Last reply:
Revision history for this message
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()

Revision history for this message
Shekhar (shekharpr10015) said :
#2

Thank you. Problem solved :-)