← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

 

Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

    Status: Answered => Open

PowerPenguin is still having a problem:
Hi, thank you for that. I haven't tried it, but now I have. I loaded the
images inside an array, but I noticed with the debug on that it was
using a lot of my cache and as a result my computer was very slow, not
only when trying to figure out which image was on the screen, but also
with the animations showing in the website or when writing something (it
needed some seconds for the letter to start appearing). This is probably
because they are a lot of images and my computer may not be able to work
on that level. Is there anything else I could do?

I leave my code here, I renamed the images to p0, p1, p2 etc and the
image it needs to clic after finding each result as r0, r1, r2.

r = regionOfTheScreen
r.setAutoWaitTimeout(0)
images = [p0.png, p1.png, p2.png, etc]
while True:
    matches = a.findAnyList(images)
    for match in matches:
         click("r"+str(match.getIndex())+".png")

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.