Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

Where to place menu for both book and doc?

$
0
0

Dear all,

 

The script I'm developing creates a menu for the various steps to be taken by the user. It acts both on a single document or on a book (all of it's documents). Adding the custom menu to the SpecialMenu works fine for the documents. This standard menu is not available if a book is active. Hence 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. Invoke the script after FM has started 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 opened first.
  2. Invoke the script after opening a document and then a book:
    The menu is available in the document, but not in a book
  3. Invoke the script after opening a book and then a document:
    The menu is available in the document, but not in a book

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


Viewing all articles
Browse latest Browse all 3715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>