user interface - Error calling similar() in Sikuli -


l = find("start_menu.png").similar(0.5).anycolor() click(l) 

the above excerpt code. "start_menu.png" refers image of windows start menu. got following error when executed this:

file "c:\users\vprave~1.tsi\appdata\local\temp\sikuli-tmp8636618870597770744.py", line 1, in   l = find("1368426219510.png").similar(0.5).anycolor().anysize() attributeerror: 'org.sikuli.script.match' object has no attribute 'similar' 

could 1 me out this? , 1 tell me how use anycolor() , anysize()?

find attempts find when it's called. code says, in prose, "find looks 'start_menu', make thing found 0.5 similar, make color"

this wrong--you can't set similarity threshold after fact. instead, call seen in sikuli docs.

instead, say

l = find(pattern("start_menu.png").similar(0.5)) 

here's same code arranged vertically:

pattern = pattern("start_menu.png") pattern.similar(0.5) l = find(pattern) 

the other problem reference anycolor() function, doesn't exist. see code you're trying run "sikuli: using gui screenshots search , automation" (linked sikuli docs), function (and syntax used in paper) don't exist in extant version of sikuli. can see open feature request on sikuli launchpad page.

this doesn't now, though. don't know of visual automation package can anycolor. if wanted use feature something, suggest asking new question describe problem you're trying solve, , may able suggest work-around specific case.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -