Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 6 Следующий »

Window focus element Version 20 (Net)

Action group: Windows


Description

The action focuses on the window element by input device (mouse) element

Action icon

Action parameters 

Input parameters 

Element - resource with data of selected element in application.

Timeout  - time in milliseconds to find required window.

Event type - event type. 

Focus - if true, then focus on the element.

Window order  - when found more than one window, action would interact with window defined by order.

X-axis shift - number of pixels by which the coordinate point will shift horizontally from the center of the specified element.

Y-axis shift - number of pixels by which the coordinate point will shift vertically from the center of the specified element.

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ElementResource with data of selected element in applicationRobin.WinElement
Yes
ТimeoutTime in milliseconds to find required window.Robin.Numeric
No
Event typeEvent typeRobin.String
No
FocusIf true, then focus on the element.Robin.BooleantrueNo
Window orderWhen found more than one window, action would interact with window defined by orderRobin.Numeric
No
X-axis shiftNumber of pixels by which the coordinate point will shift horizontally from the center of the specified element.Robin.Numeric
No
Y-axis shiftNumber of pixels by which the coordinate point will shift vertically from the center of the specified element.Robin.Numeric
No

Special conditions of use 

No prior activation of the window containing the item is required.

If there are several applications running that match the condition of this block, the operation will be performed with the last running one.

The pixel value can be positive or negative, depending on the way in which the focus should be shifted. Default value = 0 - no shift.

The robot will return an error if: 

  • coordinates go off the screen.

The group does not work with the taskbar, explorer, and workspace.

Example of use 

Task

Set the focus on the "File" element in notebook and click on the left mouse button. 

Solution

Use the "Window focus element" button. 

Implementation

  1. Assemble a robot scheme: 


  2. Set the “Window focus element” action parameters. The element for interaction must be obtained using WinSpy. Operation with WinSpy is described in the Interaction with a win element section. Setting a timeout, in general, does not increase the execution time of the action beyond the time it takes for the element we use in the action to become visible and available. During the set timeout, the action tries to access the element it is working with. As soon as the item is available, the waiting timeout expires.


  3. Click "Start" in the top panel. 

Result

The program robot completed successfully. The focus is set on the specified element. 

  • Нет меток