QuickScript Templates

The QuickScript Templates option in the QuickBuild menu allows you to insert pre-written OpusScript programs into your publication by simply selecting the name of the script template from the list provided. This means you can re-use your code over multiple projects without having to re-write or import your code from another publication.

Details of those provided with the program is available in the QuickScript Catalogue. Others may be made available on the website by ourselves and third parties.

New scripts will be made available via the website. Don’t forget, you can add your own scripts at any time to the list – see below for more information. We also encourage users to exchange scripts via our website.

To add a Script Template to an object or a page:

  1. Select the page or the object on the page that will use the script template.

  2. Select Script Templates from the QuickBuild menu – the Script Templates dialog will appear on screen.

  3. From the Script Templates dialog, select the name of the template you want to add.

  4. Tick the Use a copy of the script option if you want to insert an unchangeable version of the script. By default, this option is ticked. A warning dialog box will appear if you untick this option.

Note:
If this option is not ticked, you can edit the inserted script template within your publication. Any changes you make will overwrite the original script template. Make sure you only untick this option if you want to edit the original file, which will in turn affect all uses of that script.

  1. Click the OK button to add the script template. This will a Script object containing the script to the object you selected in point 1 above.

To add new scripts to the Script Templates list:

The Script Templates tool is very useful if you regularly use OpusScript to perform tasks in your publication. Adding a script template to the list does require you to know in which folder Opus was originally installed on your machine. If Opus is available via a network, you may need to contact your Network Administrator for more information or permission to add your script template.

  1. Insert a Script object on a page and type in your script. This can be as short or long as you require. Try and make the script generic so that it can be used by as many of your publications as possible.

  2. Click on the Set External File icon at the top of the Script Object window – this will open the standard Windows Open dialog.

  3. In the Windows Open dialog’s File name box type the name you want to give to your script. Make the name descriptive, as it is the filename that appears in the list of the Script Templates dialog.

  4. Locate the folder where Opus was originally installed and open the sub folder named Script Templates. For example, on a Windows 2000 machine, Opus is automatically installed in C:\Program Files\Opus Pro folder.

Note:
A copy of the saved script file MUST be stored in the Opus sub folder Script Templates as this is the only place that Opus generates the list that appears in the Script Templates dialog.

  1. Click the OK button to save the external file. The new script file will be given the extension name ILS.

  2. Before your script will appear in the list of Script Templates you must exit from Opus and then restart it.

  3. Finally, follow the To add a Script Template to an object or a page instructions above to add your script template to any of your publications.

Note:
For more information about creating an external file for a Script object, select OpusScript Help from the Help menu at the top of the Opus Editor and search for the phrase External Scripts.

Related Topics:

Overview of QuickBuild