Can you add a method to find all images?

xxlee

Client
Регистрация
09.03.2022
Сообщения
22
Благодарностей
3
Баллы
3
Single Image:
C#:
var imgHash = "iVBORw0KGgoAAAANSUhEUgAAACkAAAAkCAYAAAAU/hMoAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABHSURBVFhH7c4hAQAgAMAwYlCU4CQAj75ATMxcfcy1z+/GG35ksmKyYrJismKyYrJismKyYrJismKyYrJismKyYrJismKycgG82VmHnLzCNQAAAABJRU5ErkJggg==";
var rectangle = instance.DroidInstance.Screen.FindImage(imgHash, null, 95, 5);

if (rectangle.IsEmpty)
    throw new System.Exception("Not found");
instance.DroidInstance.Screen.FindImage can only find the first image on the screen that meets the requirements, but in many cases, users need to find all images and their locations, such as buttons with uncertain number and location.

Hopefully a method to find all images can be added.

Hope:

Mult Image

C#:
var imgHash = "iVBORw0KGgoAAAANSUhEUgAAACkAAAAkCAYAAAAU/hMoAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABHSURBVFhH7c4hAQAgAMAwYlCU4CQAj75ATMxcfcy1z+/GG35ksmKyYrJismKyYrJismKyYrJismKyYrJismKyYrJismKycgG82VmHnLzCNQAAAABJRU5ErkJggg==";
Rectangle[] rectangles = instance.DroidInstance.Screen.FindALLImage(imgHash, null, 95, 5);

if (rectangles.count == 0)
    throw new System.Exception("Not found");
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)