sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #41679
[Question #478963]: muti region and color match
New question #478963 on Sikuli:
https://answers.launchpad.net/sikuli/+question/478963
Hello ,
I have a RegionA which include three regions [region1][region2][region3]
And [region1][region2][region3] ,each will change color (red,green,blue,black ).
If a I have to listen color change in [region1][region2][region3] ,how can i do it simply in Java?
class scanner {
Region RegionA = new Region(0,0,1000,1000)
Region Region1 = new Region(100,100,50,50)
Region Region2 = new Region(100,200,50,50)
Region Region3 = new Region(100,300,50,50)
public string colorinRegion1 {
Match matchred = Region1 .exists(red.png path);
Match matchgreen= Region1 .exists(green.png path);
Match matchblue = Region1 .exists(blue.png path);
Match matchblack = Region1 .exists(black.png path);
String color="";
if (null != matchred){
color="red";
}
else if (null != matchgreen){
color="green";
}.......and so on
So my question is , are there another clear way to do region setting and color matching?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.