← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #256421]: Find/Exists fails with precision, while succeeds without

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- images/pattern as text
Since version 1.0.1 the IDE has a switch in the view menu, that allows, to switch from the thumbnail view (which is more a toy, than something that helps with complex scripting) to the script-as-text view, where you can do such "fine-tuning".

--- using image array does not work
might be a typo:
in __init__() you say:
 self.__Kalibruj()

but
def __Kalibruj(self, fimgKalibracni):

expects the image list as parameter???

... and (not vital):
 if exists(Pattern(fimgKalibracni[i]).similar(s/100) ,0): # no extra brackets needed

this should work, if the fimgKalibracni[i] contains a valid image
filename

... different image sets needed
this is one of the most mentioned problems, when running a script on different systems, where the "same" images look slightly different.
The only solution is to have different image sets.

The most elegant solution is to have 2 or more imagesNNN.sikuli, that
contain all images needed for a specific environment, but with the same
filenames.

So after having checked, which environment we are running in, we just set the bundle path to the correct image set.
So the workflow is setup once, but can be run with different image sets.
Some naming convention for the images should help here.

For version 1.2 is on the list to have some better support for this
image-set-switching and some support to setup and manage these image
sets.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.