Change the sensitivity of Sikuli?

I have been using siculi for a while, however I have a problem with this ... This is not sensitive enough. I'm trying to match something on the screen that is -EXACT-, and there are several other elements on the screen that look the same as the siculi take them for what I'm really looking for, so I need to do this. SEARCH ONLY this element without any differences.

How can i do this?

Oh, and to explain my problem a little further, I write a cycle for the game, as soon as the progress bar has reached 100% - he needs to allow the cycle to end (and start again), however the progress bar is just a regular rod, so when the siculi looks for it on on the screen, it finds a partially full bar (since, apparently, it corresponds to different lengths / widths / sizes of the image it is looking for) and triggers.

+5
source share
4 answers

You can do the following in Sikuli IDE:

  • Click image
  • In Template Settings> Customizing Preview, drag the similarity bar to 1.0 (all right)
  • Click OK
+6
source

Sikuli IDE, , . ( ). , . , .
, ( , ), , , "" .

sikuli Java-, Pattern(image.png).similar(y.xx)
simmilar - - 0.00 1.00. , .

+3

Will there be a next job?
Are you looking for progress to reach 100%, then run again?

  f = open("C:\\test.htm",'W')
    f.write('<font color="#347C2C">lOOPtEST</font><br />')
    f.write('loop iteration' + (str (count)) + '<br />')
    count = count + 1
    f.close()
COUNT =10
POPUP("LOOPTEST")

//image compare from progress bar

import sikuli.Sikuli *

WebPath =('Z:\\ZZZautomation\\Web\\')

BuildPath = ("Z:\BUILDS\Daily_BUILDS\QA_MainBranch_Install\*.install")
BuildNumber =  glob.glob("Z:\BUILDS\Daily_BUILDS\QA_MainBranch_Install\*.install")
for filename in BuildNumber:
    SmokeTestInfo = "SmokeTest_Build " + filename[45:50] + " Iteration 44"+".htm"
global Number
Number = filename[45:50]

global SmokeTest
SmokeTest = SmokeTestInfo

global count
count = 0

defMidProgress():
    while not exists ("//path to image of progress bar @ 50%//",FOREVER)
    //or
    wait("//path to image of progress bar @ 50%//", FOREVER)
    //using forevEr means sikuli will checK FOR 50% PROGRESS FOREVER
    //the bottom execures once the condition above is met
    open(WebPath + SmokeTest,'w')
    f.write('<font color="#0000FF">Progress is at 50%</font><br />')
    f.close()
    // writes entry to html log fie

defFinalProgress():

    while not exists ("//path to image of progress bar @ 100%//",FOREVER)
    //or
    wait("//path to image of progress bar @ 100%//", FOREVER)
    //using forever means sikuli will check FOR 100% PROGRESS FOREVER
    //the bottom execures once the condition above is met
    open(WebPath + SmokeTest,'a')
    f.write('<font color="#0000FF">Progress is at 100%</font><br />')
    f.close()
    // writes entry to html log fie


def Loop
count =0
 def midProgress():

 def FinalProgress():
0
source

To match the exact image, I use:

image1 = ("image1.png")
while not exists (Pattern(image1).exact()): 
       # Wait until that exact image appears. 
       wait(1) 
0
source

All Articles