Is there a timeout for onAppear()-like methods? --- use observe()

Asked by Landy

onAppear() methods accepts 2 arguments, the first is PS, the second is handler. I didn't find a way to pass a value of waiting time. Will it wait forever if the observed image never come up?

Question information

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

the onXXX() functions only register the event to be observed with the respective region.

onXXX() for the whole screen
reg.onXXX() for region reg

the observation in the respective region is done by an observe() where you can specify the max waiting time.

observe(timeout) looks for events specified for the whole screen
reg.observe(timeout) looks for events specified for region reg

more information: http://sikuli.org/docx/region.html#observing-visual-events-in-a-region

Revision history for this message
Landy (landy-zhu) said :
#2

Thanks RaiMan, that solved my question.