Custom Menus and Dialogs

Overview

Lua scripts can be integrated with EasyCatalog to provide custom menus and dialog boxes. User Interface is provided by the the InDesign Scripting DOM, which offers dialog creation and control.

Creating a Custom Menu Option

Adding a custom menu option is a case of creating a .lua file in the “Menus” sub folder of “Scripts” folder of a datasource. These are processed when a data source is opened. A MENU object is exposed and used to create a custom menus.
For example:

Example to Inspect the Selected Records in the Data Panel. A selection object is passed to the script:

Allow the user a choice of options. The Lua state is initialised once per session, allowing choices to be maintained: