[1.1.0] Using observe to continuously look for pattern and take actions
Here's the structure of the script:
def MainFunction():
#1. initialize program
#2. call a bunch of functions to do various things within a infinite loop
def Disconnected():
#This function closes disconnect message and attempts to continue from #2 above
def IdleObserver():
regionDisco
observe(
Goal is to detect any disconnect, call a function (e.g. Disconnected()) to remedy the situation, resume from #2 in MainFunction() and resume observing for disconnects.
Where/how do I call this IdleObserver() function so that when disconnectPattern is detected, it calls Disconnected() and then goes back to observing for disconnectPattern? Is there a better way to accomplish the same goal?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Shafiq Khan for more information if necessary.