← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #656425]: Checking for a picture faster

 

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

    Status: Open => Answered

Manfred Hampl proposed the following answer:
1. A statement like "This does not work." does not stimulate anybody to
help further. Can't you tell what happens if you try?

2. It seems that my wording was not clear enough, and you misunderstood my intentions.
Whenever you search for an image (including a click action which also does an search) , make the region where the search is executed as small as possible, and also make the image to search for as small as possible, but big enough that it is not inadvertently found elsewhere inside the search region.
This is relevant not only for the "endregion", but also for all other click (Set winner option...) actions.

The way that you did your region definition is counterproductive,
because you do it with another search inside the loop, and this will
probably even slow down the script.

My suggestion:
define the region where the green or red bar appears outside the while loop, and not by searching for an image but by giving coordinates - and as small as possible. 
If possible do the same for the region where "set winner option" will appear, and if possible also for the "yes" boxes.

I understood that the winner is announced by either a green or a red bar on a certain location on the screen.
I do not see the need to search for the complete red/green bar across the whole screen, maybe it is sufficient to check a small part of the area where that bar appears for red respectively green color.

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