Skip to main content
July 8, 2011
Answered

Adding commands to FrameMaker 8's menus

  • July 8, 2011
  • 4 replies
  • 1112 views

Well, I thought it was straightforward. I entered these two commands in mycustomui.cfg so I can open some reference docs:

<Add Separator4          <Menu !HelpMenu>>

        <Command _MYCharSet <Label Insert Characters Palette>
<Hypertext message openfile fminit/Plugins/MultiPageSymbolPalette.fm>>
        <Add _MYCharSet <Menu !HelpMenu>>

           
        <Command _MYcustomB <Label FM Escape Shortcuts>
<Hypertext message openfile help/Commands_8.0p277_UKE_FDK.pdf>>
        <Add _MYcustomB <Menu !HelpMenu>>

The commands show up in the menu, but they are grayed out.

When I enter these commands as hypertext in a regular document, the files open, so I know the paths are correct.

I'm sure the fix is simple, but I can't figure it out.

Any help would be appreciated!

    This topic has been closed for replies.
    Correct answer Lynne A. Price

    I've done more testing with FM8, FM9, and FM10.

    It seems that Arnis's observation that separators can cause problems is correct. With insertion of Separator4, the new commands are grayed out. Without it, they work correctly. Both absolute and relative filenames are accepted.

    Arnis is incorrect, however, that a semicolon at the start of a line comments it out.

    According to "Customizing Frame Products":

      

          Text outside angle brackets is treated as a comment. Don’t include angle brackets in comments.

    Therefore, a semicolon before the <Add Separator4 ... > line has no real effect--only the semicolon itself is ignored.

    The separator is fine in FM9 and FM10.

    Also, make sure your angle backets balance correctly.

              --Lynne

    4 replies

    July 11, 2011

    Well, I changed it to this and the menu items are still grayed out in Frame 8. They work correctly in Frame 7.1. Utterly baffling.


    ;<Add Separator4          <Menu !HelpMenu>>

    <Command _MYCharSet <Label Insert Characters Palette>
    <Hypertext openlink E:/DTP/FrameMaker 8/fminit/Plugins/MultiPageSymbolPalette.fm>>
    >
           
    <Command _MYcustomB <Label FM Escape Shortcuts>
    <Hypertext openlink E:/DTP/FrameMaker 8/help/Commands_8.0p277_UKE_FDK.pdf>>

    <Add _MYCharSet <Menu !HelpMenu>
    <Add _MYcustomB <Menu !HelpMenu>>

    Lynne A. PriceCorrect answer
    Inspiring
    July 12, 2011

    I've done more testing with FM8, FM9, and FM10.

    It seems that Arnis's observation that separators can cause problems is correct. With insertion of Separator4, the new commands are grayed out. Without it, they work correctly. Both absolute and relative filenames are accepted.

    Arnis is incorrect, however, that a semicolon at the start of a line comments it out.

    According to "Customizing Frame Products":

      

          Text outside angle brackets is treated as a comment. Don’t include angle brackets in comments.

    Therefore, a semicolon before the <Add Separator4 ... > line has no real effect--only the semicolon itself is ignored.

    The separator is fine in FM9 and FM10.

    Also, make sure your angle backets balance correctly.

              --Lynne

    Arnis Gubins
    Inspiring
    July 12, 2011

    Lynne,

    Thanks for the correction. I thought that anything between the semi-colon and the end of a line was always treated as a comment. Still learning something new about FM after almost twenty years...

    I must say though that having anything in angled brackets override the comment declaration is counter-intuititive.  That entry on p.23 needs to be emphasized and the behaviour difference between comments in an .ini file vs. a .cfg file should also be mentioned. More stuff for the documentation team...

    Inspiring
    July 11, 2011

    Try changing:

      Hypertext message openfile

    to

      Hypertext openlink

    Works for me in FM 7.2, 8, and 9.

         --Lynne

    July 9, 2011

    Well, I changed to this:

    ; <Add Separator4          <Menu !HelpMenu>>

    <Command _MYCharSet <Label Insert Characters Palette>
    <Hypertext message openfile E:/DTP/FrameMaker 8/fminit/Plugins/MultiPageSymbolPalette.fm>>
           
               
    <Command _MYcustomB <Label FM Escape Shortcuts>
    <Hypertext message openfile E:/DTP/FrameMaker 8/help/Commands_8.0p277_UKE_FDK.pdf>>
         

    <Add _MYCharSet <Menu !HelpMenu>>
    <Add _MYcustomB <Menu !HelpMenu>>

    Works fine in Frame 7.1, but not in Frame 8. Is it just not possible to add menu items in version 8 without writing a DLL?

    Arnis Gubins
    Inspiring
    July 9, 2011

    IIRC, the command are typically defined first before the menu sections are specified and then added, e.g.

    <Command myCustom_1 <Label Customizing Menus (Windows)>

            <Hypertext message openfile D:/Program Files/Adobe/FrameMaker11/OnlineManuals/Customizing_Frame_Products.pdf>>


    ... other things here ...


    <Add myCustom_1 <Menu ReferenceManualsMenu>>

    I also think that the full path may be required. I've had problems before with the separators. If you remove it, it might work.

    So you probably have to re-arrange yours to be something like:

    <Command _MYCharSet <Label Insert Characters Palette>

         <Hypertext message openfile fminit/Plugins/MultiPageSymbolPalette.fm>>

    <Command _MYcustomB <Label FM Escape Shortcuts>

         <Hypertext message openfile help/Commands_8.0p277_UKE_FDK.pdf>>


    ... other stuff ?

    ; <Add Separator4          <Menu !HelpMenu>>  <-- this may be problematic, comment it out using a ";" at the front

           <Add _MYCharSet <Menu !HelpMenu>>         

            <Add _MYcustomB <Menu !HelpMenu>>