Viewing Direct Input Objects
You can view the functionality of direct input objects in the Direct.Input.Helper referenced library, which is used in the workflow. This includes the Window Helper business entity object and three abstract objects (objects from which we cannot create Business Entity instances) - Automation Utils, Mouse, and Keyboard.
To view the object functionality:
1. | In Real-Time Designer, go to the Project tab. |
2. | In the Project pane, select References > Library References > Direct.Input.Helper. |
3. | Select the Functionality tab. |
4. | From the Type drop-down list, select Window Helper, Automation Utils, Mouse, or Keyboard to see the associated properties, functions, and events. |
Automation Utils
Functions | Notes |
Wait |
Used for synchronous processes. How long to wait (in msec) before the next statement. Prevents the workflow and RTClient from getting stuck. This is the default option for invoking Wait functionality. |
Begin Wait |
Similar to Wait , but for asynchronous process logic in the workflow. The result is Wait Ended. This is an advanced feature for specific use cases, and is not the default option for invoking Wait functionality. |
Check Desktop Size |
Receives the desktop's height and width, and returns true or false depending on whether the returned values match those of the current environment. To be used when recording, to verify the design time and runtime environments are identical, and can be used manually. |
Events | |
Wait Ended | The result of the Begin Wait process (see above) for asynchronous process logic in a workflow. This is an advanced feature for specific use cases, and is not the default option for invoking Wait functionality. |
Window Helper
Properties | Notes |
Caption | The name of the window. |
Class Name | The name of the class to which the window belongs. |
Exists | Indicates whether the window is exists. |
IsRunning | Indicates whether the window is being monitored. |
Process Name | The name of the process that hosts the window. |
Window Handle | The window handle according to the Windows application. |
Functions | |
Activate | Activates Window Helper Business Entity type. |
Deactivate | Deactivates Window Helper Business Entity type. |
Set Focus | Sets focus to the window that is assigned to the window helper, |
Set Foreground Window | Sets the window foreground. |
Set Position |
Automatically recorded during the workflow and consists of hard-coded coordinates (in pixels) for the input emulation. Setting the window position to original (like values during recording in design time) will result in a more reliable playback (during runtime). |
Wait for Foreground |
Waits for window to come into the foreground, resulting in a more reliable playback (during runtime). For complex sync issues (advanced developers only), this requires a timeout parameter, which determines how long to wait for the window to come into the foreground (in milliseconds). |
Events | |
Window identified | Indicates that the window is identified once the window helper instance is activated. |
Window lost | Indicates that the window is not identified after the window helper instance is activated. |
Keyboard
Functions | Notes |
Enter Text to Desktop |
The text is entered into the focused application via message emulation. |
Enter Text to Window |
The text is entered into the specific window. Parameter Types: hwnd: Windows handle. X and Y: Coordinates in pixels. AutoSetFocus: Enforces focus to the window (default is True). MessageEmulation: Uses message emulation instead of keyboard and mouse native events (default is False). |
Mouse
Functions (See Common Function Parameters below) |
Notes |
Drag and Drop | The coordinates indicate the drag and drop start and end positions of the cursor location relevant to the desktop. |
Drag and Drop in Window | The coordinates indicate the drag and drop start and end positions of the cursor location relevant to the window. |
Left Button Down to Desktop | The first stage of the left click on the desktop. |
Left Button Up to Desktop | The second stage of the left click on the desktop. |
Left Click to Desktop | A left click on the desktop. |
Left Click to Window | A left click on the desktop (coordinates relative to specified window). |
Left Dbl Click to Desktop | A left double-click on the desktop. |
Left Dbl Click to Window | A left double-click on the desktop (coordinates relative to specified window). |
Right Click to Desktop | A right-click on the desktop. |
Right Click to Window | A right-click on the desktop (coordinates relative to specified window). |
Set Mouse Position to Desktop | Sets mouse pointer to position. |
Set Mouse Position to Window | Sets mouse pointer to position (coordinates relative to specified window). |
Common Function Parameters |
hwnd: Windows handle. X and Y: Coordinates in pixels. AutoSetFocus: Enforces focus to the window (default is True). MessageEmulation: Use message emulation instead of keyboard and mouse native events (default is False). |