Where to place the menu for books and doc?

Hi all

The script I created a menu for the various measures to be taken by the user. She is also on a single document or a book (all documents). Adding the custom menu to the SpecialMenu works very well for documents. The standard menu is not available if a book is active. That's why I tried to connect it to the FormatMenu .

function DefineMenus() { 
     var menuMain = {en: "Bibliography with EndNote …",
                    de: "Bibliografie mit EndNote …"};
     var menuDocu = {en: "Documentation",
                    de: "Beschreibung (en)"};
     var menuLocation = app.GetNamedMenu("FormatMenu");
     var bibenMenu  = menuLocation.DefineAndAddMenu("!BIBENmain", (localize(menuMain)));
     bibenMenu.DefineAndAddCommand(1,"BibenDocu",    (localize(menuDocu)), "");
}

I observe the following:

  1. Call the script after FM began and no book or document is open:
    The menu is placed and available in an open document, but not in a book independently which is open first.
  2. Call the script after opening a document, then a book:
    The menu is available in the document, but not in a book
  3. Call the script after opening a book, then a document:
    The menu is available in the document, but not in a book

What needs to be done that the menu is available for books and documents?

Thank you, Jang - in the meantime I had a similar idea, noting in the menu.cfg files here one takes both a BookFormatMenu exists. But even that is not enough:

     var menuLocation = app.GetNamedMenu("FormatMenu");
     var bibenMenu  = menuLocation.DefineAndAddMenu("!BIBENmain", (localize(menuMain)));
     bibenMenu.DefineAndAddCommand(1,"BibenDocu",    (localize(menuDocu)), "");
     menuLocation = app.GetNamedMenu("BookFormatMenu");
     var bkbibenMenu  = menuLocation.DefineAndAddMenu("!BIBENmain", (localize(menuMain)));
     bkbibenMenu.DefineAndAddCommand(1,"BibenDocu",    (localize(menuDocu)), "");

The effect is the same as before!

I invoke the script without using the ESTK (because it does not work for my custom FM Setup). I write the script in EditPadPro, save it and call it via file > Scripts > Run (or catalogue). So far I am successful - a bit slow atbeit - with my development.

This process of separtation may require that I do the second part of the definition of menu in this way:

     menuLocation = app.GetNamedMenu("BookFormatMenu");
     var bkbibenMenu  = menuLocation.DefineAndAddMenu("!bkBIBENmain", (localize(menuMain)));
     bkbibenMenu.DefineAndAddCommand(1,"BibenDocu",    (localize(menuDocu)), "");

In this case, the entry in the menu Format > bibliography... is present in the document and the book, but in the book he is gray (inactive). So, there is still a missing link.

Ah, now I got it: submenu items must also be different:

     var menuLocation = app.GetNamedMenu("FormatMenu");
     var bibenMenu  = menuLocation.DefineAndAddMenu("!BIBENmain", (localize(menuMain)));
     bibenMenu.DefineAndAddCommand(1,"BibenDocu",    (localize(menuDocu)), "");
     menuLocation = app.GetNamedMenu("BookFormatMenu");
     var bkbibenMenu  = menuLocation.DefineAndAddMenu("!bkBIBENmain", (localize(menuMain)));
     bkbibenMenu.DefineAndAddCommand(1,"bkBibenDocu",    (localize(menuDocu)), "");

Tags: Adobe FrameMaker

Similar Questions

Maybe you are looking for

  • Satellite L50T-A-11 t cannot change the brightness

    Hello I did something and one day to the next the brightness does not work.Neither the control keyboard or go to settings.What could be? Thanks in advance.

  • WWAN in X 300

    I know that some X 300 comes with a Verizon WWAN card already installed. AT & T makes one that could serve as a replacement? Or wouldn't be something so simple as just switching providers? Thank you Kevin

  • COA retail (published in August 2005)

    Retail COA (released August 2005, ther for I want refurbished PC-Pre-Installed Windows COA help abaut) DANN-6QOA59GJU I'P; 192.168.2.2 Support ID:OX8DDD1003 DANNY QMOTION PC 55.274 - 648-8637434-23532 (PID) I have problem with Volum Lissance key WGA,

  • Games of vista disappearing

    Recently, I had all the games that comes with the removal of Vista. I played the titans of chess and Mahjong tiles one night and got up the next morning a cannot find the files anywhere. I can see where I played against them recently but when I click

  • cannot complete the survey of the MFN for WiFi XOOM (required #6 question?)

    Hello Responded to the survey to my Xoom WiFi but when I click on 'Next' downstairs that he appealed to question 6, as in error, I leave the field empty or fill in the MAC address: ""* This question requires an answer.". I answer questions 7 and 10 f