Share this page

# TE_wait_cursor

Cursor Functions

Waits for the cursor to appear at a specific location in the terminal window.

    int TE_wait_cursor( int col, int row, int stable, int timeout );

## Inputs

col | The desired column of the cursor.
row | The desired row of the cursor.
stable | The time (in milliseconds) that the cursor must remain at the specified location.
timeout | The time to wait for the cursor to stabilize.

During replay, TE_wait_cursor waits for the cursor to appear at a specified location in the terminal window.

For the stable parameter, you specify the time (in milliseconds) that you want the cursor to stay at the specified location. If you record a script using VuGen, stable is set to 1000 milliseconds by default. If the client application does not become stable in the time specified by the timeout parameter, TE_wait_cursor returns TIMEOUT. If you record a script using VuGen, timeout is set by default to the value of TIMEOUT, which is 30 seconds.

## Return Values

This function returns 0 if it succeeds, and a negative error code if it fails. It also sets the global variable TE_errno.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following example, the script waits for the cursor to stabilize, and remain stable for three seconds. If the cursor doesn't stabilize within 10 seconds, the function returns TIMEOUT.

    TE_wait_cursor (10, 24, 3000, 10);

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