ctrx_menu_select_item

ExampleSelection Functions

Highlights a menu item.

int ctrx_menu_select_item( char *window_name, char *menu_path, [CONTINUE_ON_ERROR,] CTRX_LAST) ;

window_nameThe title of the window in which the menu appears.
menu_pathThe full path of the menu.
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.

ctrx_menu_select_item highlights an item in a menu, but does not activate it.

The window should be in the foreground when the ctrx_menu_select_item is called.

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).

The menu path consists of all the items at each menu level that are selected to activate the selected. Levels are separated by a semi-colon ( ; ). The text of each level is passed to ctrx_menu_select_item exactly as it appears, including the periods that separate the menu item from the short-cut, and the short cut. The spaces in the menu can be replaced with a single white space.

Return Values

Citrix ICA Return Values

Parameterization

Parameterization is available for all arguments of this function.

Example

In this example, ctrx_menu_select_item selects the file open menu in Note Pad. ctrx_obj_mouse_click then activates the selection.

ctrx_set_connect_opt(APPLICATION, "#NOTES");
ctrx_set_connect_opt(NETWORK_PROTOCOL, "TCP/IP");
ctrx_connect_server("plato", "test", lr_unmask("test"), "plato", CTRX_LAST);
ctrx_wait_for_event("LOGON");
ctrx_sync_on_window("Untitled - Notepad", ACTIVATE, -4, -4, 809, 609, "snapshot1", CTRX_LAST );
ctrx_obj_mouse_click("<text=OK class=Button>", 383, 373, LEFT_BUTTON, 0, "Untitled - Notepad=snapshot2", CTRX_LAST );

ctrx_menu_select_item("Untitled - Notepad",
    "File;Open... Ctrl+O", CTRX_LAST );


ctrx_sync_on_window("Open", ACTIVATE, 0, 38, 564, 348, "snapshot6", CTRX_LAST );
ctrx_obj_mouse_click("<text=&Open class=Button>", 506, 303, LEFT_BUTTON, 0, "Open=snapshot7", CTRX_LAST );