Здравствуйте, гость ( Вход | Регистрация )

> FindColor on multiple objects with the same color
kaltorak
сообщение 16.5.2023, 2:56
Сообщение #1


**

Neophyte
Сообщений: 21
Регистрация: 12.10.2021
Группа: Пользователи
Наличность: 0
Пользователь №: 20.106
Возраст: 30



I have the following problem, I'm using the FindColor command to drag a certain object on the screen. The problem is that if another object that contains a few pixels of the same color as the main object is above the search (as in the image below) it ends up dragging the wrong object!

Is there a way I can set UOPilot to drag the object that contains the highest number of pixels?

set #a findcolor (0, 0 1024, 768 (3795132 ) %arr 2)
log #a
if #a > 250
move %arr[1 1] %arr[1 2]
end_if

In the following image, I would like to pull the object for example that is down there, but as another object that also contains the color appears above it ends up dragging that object from above.



Прикрепленные файлы
Прикрепленный файл  problem.bmp ( 112,89 килобайт ) Кол-во скачиваний: 1680
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения

Сообщений в этой теме


Ответить в эту темуОткрыть новую тему
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 

- Текстовая версия | Версия для КПК Сейчас: 8.7.2025, 0:48
Designed by Nickostyle