External Scripts

By default, a new Script Object inserted on a page is saved as an Internal Script, which means they are not linked to an External File; an Internal Script is a totally independent and self-contained script.

External Scripts are imported into Opus Pro from some external source (e.g. a floppy-disk, hard disk or network drive) and continue to be linked to the External File. Any changes made to the External File will also update the script within Opus Pro; equally, any changes made in Opus Pro to the script will update the External File.

If you use the same script on multiple pages within your publication, you should link your Script Object to an External File – any changes you make on one page will automatically be updated on all pages. Use Internal Script, if other pages within your publication do not require the same script.

To import an External File to a Script Object

  1. Click the Set External File icon from the Script Object Toolbar – this will open the Windows Open dialog.

  2. From the Open dialog, locate the External File from the current directory or navigate to the required directory to find the file.

Note:

Internal Scripts that have previously been saved as External Files are given the file extension .ILS. You can import these files or files with other extensions, such as .TXT.

  1. Highlight the External File name and click on the Open button – this will open the Warning dialog.

  2. Use the Import button in the Warning dialog to import the External File – this will delete the current contents of the Script Object and replace it with the contents of an External File.

  3. Use the Overwrite button in the Warning dialog to delete the current contents of the External File and replace it with the contents of the Script Object.

Saving an Internal Script as an External File

  1. Any code written in a Script Object can be saved to an External File and imported into Script Objects on other pages of the same publication or in new or existing publications.

  2. To save an Internal Script as an External File, first open the appropriate Script Object in your publication.

  3. Select the Set External File icon from the Script Object Toolbar – this will open the Windows Open dialog.

  4. From the Open dialog, locate the directory in which you want to save the External File. By default, the current directory displayed is the publication’s directory – we recommend you save your External File in this directory.

  5. Type the name you want to give to the External File in the Filename box in the Open dialog and press the Open button to save the file.

  6. If the filename you enter already exists, you will be given the opportunity to Import or Overwrite the file (see previous section above).

Related Topics:

The Script Object window