
587
ADOBE FRAMEMAKER SCRIPTING GUIDE
Function Summary
Last updated 9/26/2011
To change a menu’s position on a menu or menu bar after you add it, set its
PrevMenuItemInMenu
and
NextMenuItemInMenu
properties.
The method returns the command, on success.
On failure, the method returns one of the following values to
FA_errno
:
Returns
int
Syntax
AddMenuToMenu(menu)
Parameters
DefineAndAddMenu
Description
Defines a menu (
FO_Menu
object) and adds it to another menu.
To add a menu to one of FrameMaker’s menus or menu bars, you must get the menu or menu bar’s object. To get its
object, call
GetNamedObject()
with the
objectName
parameter set to its name.
The following table lists some of the menu bars that you can add menus to and the strings that specify them. Menu bar
names preceded by an exclamation mark (!) cannot be removed by the user.
Type of menu or menu bar
you are adding a menu to
How FrameMaker implements the
added menu
FrameMaker product adds the menu
Menu bar
Pull-down menu
At the right of the menu bar.
Pull-down menu
Pull-right menu
At the bottom of the pull-down menu.
Pop-up menu
Pull-right menu
At the bottom of the pop-up menu.
Pull-right menu
Pull-right menu
At the bottom of the pull-right menu.
Error
Reason
Constants.FE_WrongProduct (-60)
Current FrameMaker product does not support this operation or
fmbatch
is running.
Constants.FE_NotMenu (-72)
The specified menu does not exist.
Constants.FE_BadOperation (-27)
Parameters specified an invalid operation.
Constants.FE_BadParameter (-43)
The specified parameter has an invalid value.
Constants.FE_SystemError (-42)
System Error
Parameter name
Data Type
Optional
Description
menu
Menu
No
The new menu to be added.
FrameMaker menubar
Menubar string
Menu bar for documents (complete menus)
!MakerMainMenu