Question #145806 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/145806
RaiMan proposed the following answer: trying to click() on each color element using an image will not work. It is a known problem, that shapes that only differ in color might not be found correctly, if Sikuli has the "choice" (more than one element currently on screen). I suppose, that the color picker is a fixed element. I usually solve this kind of problem this way: - somehow get the position of the whole color picker - calculate the offset of the needed click points relative to the color picker example: m = find(<image of color picker>) red = m.getCenter().left(50) blue = m.getCenter().right(20) #.... and more as needed click(red) # would select red color The offsets can be measured using the Preview window and manually taken into the script. Alternatively you can make a Pattern with a target offset for each element, but I always try to minimize find operations: red = Pattern(<image of color picker>).targetOffset(-50,0) blue = Pattern(<image of color picker>).targetOffset(20,0) #.... and more as needed click(red) # would select red color -- You received this question notification because you are a member of Sikuli Drivers, which is an answer contact for Sikuli. _______________________________________________ Mailing list: https://launchpad.net/~sikuli-driver Post to : [email protected] Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp

