Share this page

# rdp_get_active_window_title

Retrieves the title and ordinal value of the active window.

General Functions

int rdp_get_active_window_title( "StepDescription=<step_description>", "Snapshot=<snapshot>", ["ConnectionID=<connection_identifier>",] "WindowTitle=<window_title_param>", "WindowOrdinal=<window_ordinal_param>", RDP_LAST );

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure. Note that LR_PASS and LR_FAIL generally indicate whether the function call completed without an exception, and not that the test step succeeded.

All string arguments (char type) can be parameterized using standard parameterization.

Argument | Description
--- | ---
StepDescription | A descriptive, unique name for this step.
Snapshot | The name of the snapshot file of the screen state before this step.
ConnectionID | The name of the connection on which this function operates. Do not change the recorded ID. If several connections are open and the ID is not specified, the first connection in the script is used. If only one connection is open, the connection ID is unnecessary.
WindowTitle | Output parameter for the title of the active window.
WindowOrdinal | Output parameter for the 1-based index of the active window.
RDP_LAST | A delimiter marking the end of the argument list.

The rdp_get_active_window_title function retrieves the title and ordinal position of the active window.

This function requires that an RDP agent be installed on the RDP Server.

## Example

The following demonstrates how to retrieve the title and ordinal position of the active window and store these values in the TitleParam and OrdinalParam output parameters.

Copy code

    rdp_get_active_window_title (
        "StepDescription=Get Window Position 1",
        "Snapshot=snapshot1.inf",
        "WindowTitle=TitleParam",
        "WindowOrdinal=OrdinalParam",
        RDP_LAST );

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: