Question
How to place a menu item?
Dear all,
To identify the current FM session (whether it is 13, 14 or …) I want to place a small menu-item with just the FrameMaker major version as label. My script works fine with the exception that the location is not very useful:

How can I place it to very left after the application icon?
// FMident.jsx
#target framemaker
main ()
function main (){
var bkFMidMenu, docFMidMenu, menuLocation, oMenus = {}, oCmd = {};
var sVmajor ="15"; // to be evaluated programmatically
oMenus.MenuMain = sVmajor; // top menu can not execute a command
oMenus.MenuInfo = "Information";
menuLocation = app.GetNamedMenu("!MakerMainMenu");
// --- Command definition for documents and books
oCmd.MenuInfo = DefineCommand(1,"FMid", oMenus.MenuInfo, "");
oCmd.bkMenuInfo = DefineCommand(1,"FMid", oMenus.MenuInfo, "");;
// --- Assign commands to menus
menuLocation = app.GetNamedMenu("!MakerMainMenu");
docFMidMenu = menuLocation.DefineAndAddMenu("!FMidMain", oMenus.MenuMain); // ! required for top menu
bkFMidMenu = menuLocation.DefineAndAddMenu("!FMidMain", oMenus.MenuMain); // ! required
docFMidMenu.AddCommandToMenu (oCmd.MenuInfo);
bkFMidMenu.AddCommandToMenu (oCmd.bkMenuInfo);
UpdateMenus();
}
function Command(cmd) { // ========================================================================
switch(cmd) { // Respond to menu command.
case 1:
Alert ("This info will be about the current FM version, system etc.\nAnd it will be copied to the clipboard for arbitrary use.");
break;
}
} // --- end Command
