Stopping main program flow while a handler is active
For example, lets say we have a simple Script like:
(1)def myHandler(event):
(2) #code to make popup vanish
(3) event.region.
(4)def func():
(5) #Main Function code
(6) onAppear(pImage, myHandler)
(7) observe(
(8) wait(5)
(9) #Continue with main function
The problem i'm having is that the image i'm observing for won't necessarily always appear during automation of a particular GUI app - in fact most of the time it won't. The only way I can get this to work is to to put a long wait between the observer action area and the continued flow of the program (9) This however means a needless 5 second pause every time automation is executed and that image/window does not appear. I have tried using various boolean flags but to no avail. Does anyone else have any experience with this?
Thank you
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Ned
- Solved:
- Last query:
- Last reply: