Syntax for exists()
Raimund,
I've been using exists to find objects on screen. However, I don't fully understand the syntax.
Questions:
The following waits for image1 to exist. The last component "0" allows the script to continue when a match exists before the autotimeout of 3 seconds.
while not exists ("Image1.png", 0):
What I don't understand is:
What is the purpose of adding an indented wait()? is the indented wait() another finder?
while not exists ("Image1.png", 0):
wait(1)
The wait is a imed pause that loops unitl a condition is met?
How is this not an infinite loop?
Simple question however I've not found a clear explination.
My boss is questioning my scripts and wondering what i'm dong to handle this condition.
Good question because I could not answer.
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 surfdork for more information if necessary.