[HowTo] Use Region to speed up execution
I'd like to try to implement the Region class to make the script run faster, the script is clicking after ~550msec after the images appear on the screen, I don't know If It would be possible to make it run even faster.
Do you think it would be possible?
If so, does anybody can point out to me where I should start?
Sikulix version: 1.1.3 (Should I update to the 2.0 version?)
That's my script:
img1 = "img1.png"
img11 = "img11.png"
img111 = "img111.png"
img12 = "img12.png"
img121 = "img121.png"
img2 = "img2.png"
def do(a, b, ab, abc):
if not (exists(a, 0) and exists(ab, 0)):
return
click(abc)
start = time.time()
while exists(ab, 0):
wait(0.1)
while time.time() < (start + 3) and exists(a, 0):
pass
if exists(a, 0):
click(b)
return
while True:
do(a="img1", b="img2", ab="img11", abc="img121")
do(a="img1", b="img2", ab="img12", abc="img111")
Thank you for your help and attention!
I'm sorry for any inconvenience.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: