Scripting Module

Using the ‘monitorFolder’ method

The Scripting Module now provides a mechanism to automatically execute an ExtendScript file when a specific ‘trigger’ file is dropped into a monitored folder. Starting monitoring The ‘monitorFolder’ method should be called on the EasyCatalog object to begin polling a specific folder – e.g.

Four folders are required for the monitoring process: An ‘in‘ …

Using the ‘monitorFolder’ method Read More »

Scripting Support For Links

ecLink Class From 2022, an ecLink class has been added to the scripting module to enhance the scriptability in the creation, inspection and modification of links. This represents an EasyCatalog link, either text or frame based. An ecLinks collection exists on most InDesign layout objects. Basic Properties A link is described using 3 basic properties: …

Scripting Support For Links Read More »

Replacing Delimited Field Names With Field Content

The example below replaces field names delimited between { and } with the field content. E.g: “This is a field with another field {name} inside” The replaces “name” with the contents of field called “name”.


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. Details on how to access this from Lua are here. Creating a Custom Menu Option Adding a custom menu option is a case of …

Custom Menus and Dialogs Read More »

Creating a Calendar using LUA

This example code creates a calendar tabular field using data where each record is an event on a calendar. The data has fields contain the month and year.  GROUPSCRIPT is used to call the script for each month group. This data can then be paginated using Master based pagination.


Custom Image Import

For images that are sourced externally but are not URL or File based, the “Custom” option can be chosen in the picture location section of the field options. When this is set, EasyCatalog looks for a file called ‘CustomImageImport.jsx’ in the ‘Scripts’ folder of a data source. Here’s a simple example that displays the field …

Custom Image Import Read More »

Custom Relinking of Fields

The standard “Adopt Fields” method of relinking assumes field names and key field values are consistent between the existing links and the new data.  It was designed to link fields from one data source to another, and as such is limited to changing the key element of a link. In some circumstances it may be …

Custom Relinking of Fields Read More »

Accessing Guide Based Pagination Progress on InDesign Server

There is a script called “PaginationProgress.jsx” which you can place in the Data Sources “Scripts” folder. This is passed script arguments: “datasource”  : The Data Source Name “stepindex”  : Current Step Index “stepcount” :  Total Number of Steps “step message” : Related Message You can access them like this: var stepCount = Number(app.scriptArgs.getValue(“stepcount”));

Advanced Conditional Processing Using Lua

EasyCatalog supports an embedded version of the Lua programming language.  When text is processed, any commands between  delimiters [[ and ]] are processed using Lua. EasyCatalog supplements Lua with functions to make data access easier. For example:

In this example, if the contents of the ‘new’ field are equal to ‘1’ the text NEW! will be output. …

Advanced Conditional Processing Using Lua Read More »

Get the name of the selected data source

While you can get the selected panel (DSV) object. To get the name of the data source, the parent object needs to accessed:

Setting pagination options via a script

The options shown on the “Paginate” dialog can all be set using the ‘setPaginationOption‘ scripting method which is available on the datasource object.  This method takes two parameters: the name of the option to set and the value to set it to.

The value used for the ‘name‘ parameter can be determined by examining …

Setting pagination options via a script Read More »

Referencing a field in a CALLSCRIPT script

Here’s an example CALLSCRIPT script that references record data passed to it:

Using a post image import script to manipulate an image

After EasyCatalog imports an image, it looks for a script called “PostImageImport.jsx” in both the Data Source->Scripts folder and the EasyCatalog Workspace Folder->Scripts folder. This can be used to manipulate an image after import. The example below applies the DETECT EDGES clipping path setting: