Back Home Table of Contents

Macros

Macros are custom commands that can run one or more actions from a single click. They are written as NPS script action and give you the exact set of features as scripts, but what sets them apart is that they can be placed as custom toolbar buttons or added to existing menus rather than being limited to the Script menu.

Basics

The Macro Editor (Tools -> Macro Editor) allows you to build macros and place them in a toolbar or menu.

Name

Give your macro a name. This is the name that will be displayed in the button or menu.

Action

Specify a direct script action, or point to a full script editable in the Script Editor for more complex macros.

Enabled when

Specifies when the macro button is enabled.

  • Always: Always enabled
  • Document open: Enabled when a document is open, disabled otherwise
  • Selection active: Enabled when a selection is active, disabled otherwise

Icon

Choose an icon for the button. A set of icons is built in, or you can upload your own icon.

An icon is recommended for toolbar display, but you can still display the macro in a toolbar as text if no icon is specified.

Adding to menus and toolbars

Your macro can be added to a menu, toolbar, or both. Choose which menu or toolbar to add it to, then specify its relative position next to other items.

Menu and Toolbar Editor

You can create custom menus, submenus, and toolbars if the built-in ones aren't sufficient. Both are edited using the Menu Editor dialog. Once you have added your custom menu/submenu/toolbar, you can select it in the Macro Editor as a destination for your macro.

Main menu

A main menu appears at the top of the screen. Specify its position relative to the built-in menus.

Submenu

A submenu is added to an existing menu. Submenus can be nested within other submenus.

Nesting ability depends on order. If you want Menu B to nest within Menu A, you must position Menu A above it in the Menu Editor. This restriction prevents circular nesting.

Toolbar

Toolbars appear at the top of the screen and can be shown/hidden in the View -> Toolbar menu. They cannot be nested, but you can place submenus inside toolbars to act as dropdown buttons.

Quick Action

The Quick Action button can be configured to use a macro or a menu.

See also: