nca_menu_select_item

Menu Object Functions

Selects a menu item.

int nca_menu_select_item( LPCSTR window, LPCSTR menu;item );
window The name of the active window.
menu The logical name of the menu.
item The item name to select.

The nca_menu_select_item function selects an item from a menu according to the logical name of the menu and the name of the item. Note that menu and item are represented as a single string, and are separated by a semicolon.

When an item is selected from a submenu, each of the consecutive levels of the menus is separated by a semicolon in the format "menu; sub_menu1; sub_menu2;...sub_menun; item." The selected item must be the last item in a menu, for example: nca_menu_select_item ("File"); is not legal, while nca_menu_select_item("File;Open"); is legal.

Return Values

Oracle NCA Error Codes

Parameterization

The following variables can be parameterized using standard parameterization: window, menu, item

Example

In the following Oracle NCA example, the nca_menu_select_item function selects "Enter" from the Query menu and "Exit Oracle Applications" from the Actions menu.

nca_menu_select_item("Toolbar", "Query;Enter");
nca_message_box_press("Forms",1);
nca_menu_select_item("Toolbar", "Action;Exit Oracle Applications");
nca_popup_message_press("Caution", "OK");