ctrx_list_select_item

ExampleSelection Functions

Selects an item from a list.

int ctrx_list_select_item( char *window_name, long xpos, long ypos, char *item, [CONTINUE_ON_ERROR,] CTRX_LAST );

window_name The title of the window in which the menu appears.
xpos The input parameter containing the horizontal distance of the left edge of the item from the edge of the application window.
ypos The input parameter containing the vertical distance of the top edge of the item from the edge of the application window.
itemThe item in the list.
CONTINUE_ON_ERROR A constant, entered as shown without quotes. Overrides the error behavior runtime setting for this step so that script behaves as though the runtime setting was Continue on error.
CTRX_LAST A marker that indicates the end of the argument list.

The ctrx_list_select_item function selects an item from list. It supports lists of class ListBox or ComboBox.

Note: This function is available only if the Citrix agent is installed. For details, see Citrix agent overview in the VuGen Help Center (select the relevant version).

Return Values

Citrix ICA Return Values

Parameterization

Parameterization is available for all arguments of this function.

Example

Example: ctrx_list_select_item

In this example, ctrx_list_select_item selects a font in the Notepad application.

ctrx_sync_on_window( "Untitled - Notepad",
    ACTIVATE, -4, -4, 809, 609, "snapshot1", CTRX_LAST );

ctrx_obj_mouse_click("<text=OK class=Button>", 
    394, 376, LEFT_BUTTON, 0, "Untitled - Notepad=snapshot2",
    CTRX_LAST );

ctrx_obj_mouse_click("<text=Untitled - Notepad class=Notepad>",
    80, 32, LEFT_BUTTON, 0, "Untitled - Notepad=snapshot3", 
    CTRX_LAST );

ctrx_sync_on_window("58_37_100_41", CREATE, 58, 37, 100, 41, 
    "snapshot4", CTRX_LAST );

ctrx_obj_mouse_click("<class=#32768>", 93, 66, LEFT_BUTTON, 0, 
    "Untitled - Notepad=snapshot5", CTRX_LAST );

ctrx_sync_on_window( "Font", ACTIVATE, 20, 126, 438, 345, 
    "snapshot6", CTRX_LAST );

ctrx_obj_mouse_click("<text=Times New Roman class=Edit>",
    124, 58, LEFT_BUTTON, 0, "Font=snapshot7", CTRX_LAST );

ctrx_list_select_item( "Font", 124, 58, "Arial Black", CTRX_LAST );
ctrx_key( "ENTER_KEY", 0, CTRX_LAST );
ctrx_sync_on_window( "Untitled - Notepad", ACTIVATE, -4, -4, 809, 609, "snapshot8", CTRX_LAST );
ctrx_type( "Test", CTRX_LAST );