Add Save To Context Menus

Script for Adobe InDesign

Script adds Save command to right-click contexts menus.

  • Also remove with simple edit
  • Adapt open source to edit other menus
Download
Add Save To Context Menus
Many scripts are free to download thanks to the support of users. Help me keep developing new scripts by supporting my work. Click the PayPal button to contribute any amount. Thank you.

How to use the script

The script has no interface other than a done alert. Run the script and the Save command is added to the right-click context menus Default, Layout, and Text.

To remove Save from the context menus, edit the script and comment the lines 19-21 to disable adding Save to the context menus. Run the script again.

Any questions contact the author William at any time.

Source code

(download button below)

(function () {
    // The 'Save' menu action.
    var maSave = app.menuActions.item("$ID/Save").getElements()[0];
    // Context menus.
    var mcLayout = app.menus.item("$ID/RtMouseLayout");
    var mcDefault = app.menus.item("$ID/RtMouseDefault");
    var mcText = app.menus.item("$ID/RtMouseText");
    // Remove existing assignments to context menus.
    if (mcLayout.menuItems.item(maSave.name).isValid) {
        mcLayout.menuItems.item(maSave.name).remove();
    }
    if (mcDefault.menuItems.item(maSave.name).isValid) {
        mcDefault.menuItems.item(maSave.name).remove();
    }
    if (mcText.menuItems.item(maSave.name).isValid) {
        mcText.menuItems.item(maSave.name).remove();
    }
    // Assign menu action 'Save' to context menus.
    mcLayout.menuItems.add(maSave, LocationOptions.AT_BEGINNING);
    mcDefault.menuItems.add(maSave, LocationOptions.AT_BEGINNING);
    mcText.menuItems.add(maSave, LocationOptions.AT_BEGINNING);
    alert("Done");
})();
Many scripts are free to download thanks to the support of users. Help me keep developing new scripts by supporting my work. Click the PayPal button to contribute any amount. Thank you.
Download
Add Save To Context Menus

For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.

Also available for hire to program custom solutions. Contact William for more information.

IMPORTANT: by downloading any of the scripts on this page you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.