5 Replies Latest reply on Jul 13, 2017 5:26 AM by tobiask43046735

    How to add a custom section to the settings menu?

    tobiask43046735 Level 1

      For my ever-growing set of scripts customization options are starting to become necessary. Is there any way to create a new section in the settings menu or do I have to create my own Window for this?

        • 1. Re: How to add a custom section to the settings menu?
          Laubender Adobe Community Professional & MVP

          Hi Tobias,

          are you talking about organizing script files in your Scripts Panel? That's doable.
          You could use folder structures and alias files for folders or script files.


          For example: You could start with a folder somewhere on your harddisk and do an alias from it.
          Duplicate that alias to your personal Scripts folder in your User folder.


          In the original main folder you can add and remove alias files, alias folders or whole file-folder structures that alias to other folders of your harddisk. Depending on the amount of files InDesign will (nearly) immediately show the updated contents in the Scripts Panel.


          With my own workflow on OS X I am using a main alias with a folder. And I am using duplicates of that alias with several versions of InDesign installed. I will move this alias out and in of the Scripts Panel folder in my User folder.
          One application of this: Sometimes I have to do a list of all keyboard shortcuts. This could be a time consuming process because InDesign will also list every file that is visible in the Scripts Panel.


          I will do a similar process if I gather a bunch of scripts for a dedicated job with a customer.

          Or if I need a set of scripts for a special workflow. Let's say working with tables or working with MSOs.



          Harbs from in-tools once wrote a script for installing scripts:

          Script Installation | in-tools.com


          And there is ScriptBay as well ( not for CC 2017 because it's a Flash based panel. Maybe some issues to install it with CC 2015 because of an installer problem that is enforced by the Adobe Application Manager ):

          Script Bay Update | in-tools.com



          • 2. Re: How to add a custom section to the settings menu?
            tobiask43046735 Level 1

            Hi Uwe,

            thanks for your reply. But what I'm talking about is the Preferences menu (sorry, I mistranslated from German).



            I would like to have another entry at the bottom which upon selection makes the right pane show the configuration for my scripts.




            • 3. Re: How to add a custom section to the settings menu?
              Pickory Level 4



              I think that you can only add to that window through a C++ plugin.



              • 4. Re: How to add a custom section to the settings menu?
                Dirk Becker Level 4

                Adding the menu item works, but for the selectable dialog you indeed need a plugin.

                I'd suggest to add a separate menu for your preferences and create a similar dialog using ScriptUI.

                I found the prefs menu within the AppleMenu, your mileage may vary with Windows, InCopy and who knows, so tweak the search to your needs. Btw, to plugins the prefs menu is a sub-menu of the edit menu, that's why I started there.


                #targetengine "test"
                  var actionName = "Action!";
                  var hereName = "Here!";
                  var mainMenu = app.menus.itemByName("$ID/Main");
                  var appleMenu = mainMenu.submenus.itemByName("$ID/AppleMenu");
                  var editMenu = mainMenu.submenus.itemByName("$ID/&Edit");
                  var prefsMenu = mainMenu.submenus.itemByName("$ID/Preferences");
                  if( !prefsMenu.isValid )
                    prefsMenu = editMenu.submenus.itemByName("$ID/Preferences");
                  if( !prefsMenu.isValid && appleMenu.isValid )
                    prefsMenu = appleMenu.submenus.itemByName("$ID/Preferences");
                  var hereMenu = prefsMenu.parent.submenus.itemByName(hereName);
                  if( !hereMenu.isValid )
                    hereMenu = prefsMenu.parent.submenus.add(hereName,LocationOptions.AFTER,prefsMenu);
                  var action = app.scriptMenuActions.itemByName(actionName);
                  if( action.isValid )
                  action = app.scriptMenuActions.add({name:actionName});
                //~ action.eventListeners.add("beforeDisplay",display,false);
                  var menuItem = prefsMenu.menuItems.itemByName(actionName);
                  if( menuItem.isValid )
                  menuItem = prefsMenu.menuItems.add(action,LocationOptions.AT_END,null);
                  var menuItem = hereMenu.menuItems.itemByName(actionName);
                  if( menuItem.isValid )
                  menuItem = hereMenu.menuItems.add(action,LocationOptions.AT_END,null);
                function invoke(e)
                • 5. Re: How to add a custom section to the settings menu?
                  tobiask43046735 Level 1

                  Thank you, Dirk. Seems like that is as far as scripting can go