02-12-2023, 10:54 AM
I tried it, but it couldnt find the image. The next thing i tried was to add diff: but no matter what value i give it, no images are found.
Can you please help me Gintaras?
Maybe it finds images but more than two? This could be possible.
Can i choose to pick the closest one and ignore other images?
[/code]
Can you please help me Gintaras?
Maybe it finds images but more than two? This could be possible.
Can i choose to pick the closest one and ignore other images?
[code]var w = wnd.find(1, "Document - WordPad", "WordPadClass");
IFImage[] image = {
@"C:\Users\User\Documents\IMG\pos1.bmp",
@"C:\Users\User\Documents\IMG\pos2.bmp",
};
var a = new List<uiimage>();
uiimage.find(w, image, IFFlags.WindowDC, diff: 70, also: o => { a.Add(o); return IFAlso.OkFindMoreOfList; });
if (a.Count == 2) {
int dx = a[1].Rect.left - a[0].Rect.left, dy = a[1].Rect.top - a[0].Rect.top;
print.it("1 Pos difference: ", dx, dy);
wait.s(1);
} else {
print.it("Pos not found");
wait.s(1);
}
[/code]