sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #19623
Re: [Question #233507]: Cleanest way to search if at least one image of a set is present
Question #233507 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/233507
Status: Needs information => Solved
Giuseppe Marullo confirmed that the question is solved:
Thank you RaiMan.
The part you provided was how to capture the icon (Thank You!) I was
trying to write the following comparison part, here it is what I wrote
about it:
File path = new File("./ccleaner/icon");
File [] files = path.listFiles();
boolean iconfound = false;
Integer i = 0;
while ( (i < files.length) && (iconfound == false )) {
Pattern ccleanericon = new Pattern(files[i].getAbsolutePath());
int timeout = 5;
if (k.exists(ccleanericon.similar(similarity),timeout)!= null) {
System.out.println("Found " + files[i].getAbsolutePath() );
Match m = k.find(ccleanericon);
m.highlight(2);
k.doubleClick(ccleanericon);
iconfound = true;
}
else {
System.out.println("Not Found " + files[i].getAbsolutePath());
}
i = i + 1;
} // end of while
I was a Java problem, I mean it was me not being able to create a loop of comparisons driven by the list of files in a folder.
I was hoping there was a command in the API to check a set of images in a folder against the screen.
If there is not such a command, I will stick with this version.
>not really clear what you mean
Sorry, I was referring to the Findall function, that is able to create a loop action on all the checkboxes on the screen
Thanks again, you provide realtime help in a very valuable way
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.