I use this code to wait for an object in SikulixIDE 1.1.4-SNAPSHOT
: wait(Pattern("1548143854795.png").similar(0.7),35)
.
After 15-20 seconds object is present on screen, but it doesn't wait for it. Next type()
methods are executed without waiting for object.
Asked
Active
Viewed 620 times
1

plaidshirt
- 5,189
- 19
- 91
- 181
1 Answers
2
This usually happens if something else is visible on the screen that matches also with a similarity >0.7.
You can check this in the IDE with the Preview feature (click the image).
Programmatically you can highlight the found match:
wait(Pattern("1548143854795.png").similar(0.7),35).highlight(3)
If something else is found you might try with a higher similarity like 0.95 or even 0.99 (exact match).

RaiMan
- 1,088
- 8
- 13