Window focus element Version 20 (Net)
Action group: Windows
Description
The action focuses on the window element by input device (mouse) element
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Element | Resource with data of selected element in application | Robin.WinElement | Yes | |
Тimeout | Time in milliseconds to find required window. | Robin.Numeric | No | |
Event type | Event type | Robin.String | No | |
Focus | If true, then focus on the element. | Robin.Boolean | true | No |
Window order | When found more than one window, action would interact with window defined by order | Robin.Numeric | No | |
X-axis shift | Number of pixels by which the coordinate point will shift horizontally from the center of the specified element. | Robin.Numeric | No | |
Y-axis shift | Number 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
- Assemble a robot scheme:
- 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.
- Click "Start" in the top panel.
Result
The program robot completed successfully. The focus is set on the specified element.
Обзор
Инструменты контента