Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Find text on screen Version 9 (Python)

Группа действий: Машинное зрение 

Описание

Данное действие предназначено для поиска на экране текста и получения его координат. 

Иконка

Image Removed

Параметры

Входные параметры  

Текст                                    Текст, который нужно найти.

Язык текста                         Язык текста, который нужно найти

Таймаут, мс                         Время, в течении которого будет ожидаться появление заданного текста. Тайм-аут задаётся в миллисекундах

Режим поиска                    Выпадающий список из значений: по совпадению строки, по совпадению слов

Область                               Если поле заполнено, то поиск производится только внутри заданной области.

Выходные параметры

Результат Переменная, в которую будет записана коллекция точек

Настройки

...

Свойство

...

Описание

...

Тип

...

Пример заполнения

...

Обязательность заполнения поля

...

Параметры

...

Текст

...

Текст, который нужно найти.

...

Robin.String

...

Да

...

Язык текста

...

Язык текста, который нужно найти

...

Robin.String

...

Да

...

Таймаут, мс

...

Время, в течении которого будет ожидаться появление заданного текста. Тайм-аут задаётся в миллисекундах

...

Robin.Numeric

...

Нет

...

Режим поиска

Action group: Vision

...

Description

The action finds the text on the screen and gets its coordinates. 

Action icon

Image Added

Parameters

Input parameters

Text - text to find. 

Language of the text - expected language of the text to find. 

Timeout (ms) - the time in milliseconds during which the appearance of the specified text will be expected. 

Search mode - search mode: by row to match or by word match. 

Area - If the field is filled in, the search is performed only within the specified area 

Output parameters

Result - variable which the the collection of points will be written into.

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
TextText to find.Robin.String
Yes
Language of the textExpected languages of the text to findRobin.String
Yes
Timeout (ms)The time in milliseconds during which the appearance of the specified text will be expected.Robin.Numeric
No
Search modeSearch mode: by row match or by word matchRobin.String
No
AreaIf param set, action would recognize text in selected areaRobin.RectangleL ocation
No
Results
ResultReturns collection of pointsRobin.Collection

Special conditions of use

If the text on the screen is not found, the robot will crash with errors: "Waiting time has expired" or "Text not found".

Parameters of use

Task

There is a text on the screen, it is necessary to recognize "Active sprints" (by word match) and return a collection of coordinate points found on the screen according to the given text. Then, get the value by index from the collection. 

Image Added

Solution

Use the "Find text on screen" action. 

Implementation

  1. Assemble a robot scheme with the actions: 
    Image Added

  2. Set the "Find text on screen" action parameters. 
    Image Added

  3. Set the "Get index of element" action parameters. 
    Image Added

  4. Run the robot by clicking "Start" in the to panel. 

Result 

The program robot completed successfully. The collection of coordinate points found on screen according to the given text was returned. Center coordinates are returned.

Image Added

 

...

Режим поиска. Выпадающий список из значений: по совпадению строки, по совпадению слов

...

Robin.String

...

Нет

...

Результат

...

Возвращает коллекцию точек

...

Robin.Collection

Особые условия использования 

Отсутствуют. 

Пример использования 

Задача

На экране существует текст, необходимо распознать "Активные спринты" (по совпадению слов) и вернуть коллекцию точек координат, найденных на экране в соответствии с указанным текстом. Далее, получить значение по индексу из коллекции. 

Image Removed

Решение

Воспользоваться действием "Найти текст на экране" 

Реализация

...

Результат 

Программный робот отработал успешно. Возращена коллекция точек координат, найденных на экране в соответствии с указанным текстом. Возвращаются координаты центра.

Image Removed