Adobe InDesign
Calendar Wizard

by Scott Selberg

Advanced Features: Presets

The presets are text files which describe some or all of the settings in the ScriptUI Interface. This is a new feature introduced in Version 5 of the Calendar Wizard and only available with the ScriptUI Interface.

The presets are managed from the few controls in the top right of the Basic controls view for the Grid, List and Line calendar. A preset can be selected and loaded. A preset can be selected and deleted ("-" button). A preset can be saved ("+" button).

ScriptUI Interface - Presets

If a preset was selected prior to the save request, the script will attempt to overwrite the preexisting preset. Therefore, editing a preset consits of selecting one, loading it, making some changes, and saving the new preset with the same name as the old one.

Special Presets

There are two special presets - the Calendar Wizard default and the last run. When saving a preset, there is an option to save it as the default. That will cause the preset to be saved with a special name and loaded automatically when the Wizard is started. The wizard will aslo create a preset automatically called "Last Run" every time a calendar is created. This allows a user to easily restore the settings from the last time the script was executed.

Partial vs Full Presets

Presets can be generated in one of two ways: full and partial. A full preset saves every value. Loading a full preset restores every setting. A partial preset only saves the values that are different from the default. Loading a partial preset will only adjust the state of values defined in the partial preset.

An example is helpful to understand the value of the partial preset. A printing house might create some presets that set layout (document size and custom frames). They might also have some presets that describe a structure (moons, mini-calendars, holidays..). The partial presets allow the graphic artist to load the layout preset and then load the structure preset without the two conflicting.

The only exception to the partial preset rule is that should a value be saved that is dependant on the units (for example the height and width of the calendar frame), the units are saved/recalled in the partial preset as well even if the value matches the default.

Partial Presets and the Script Default

If a new default for the script has been saved, the original default for the script can be restored by starting the wizard and saving a partial preset as the default without changing any values. As every value is in it's default state, no values will be saved in the parital preset thus restoring the script to factory defaults.

Preset Files Under the Hood

Under the hood, the presets are just files. The directory they are being saved to is shown on the help tab of the ScriptUI Interface. A preset can be viewed or copied between comptuers by just copying the file into the preset directory.

The file, defaults.txt, are the defaults for the script. The file "Previous Run.txt" is the partial preset from the last time a calendar was generated. Presets saved by the user are in the folder "userPresets".

It is not adviable to edit the preset files directly.