Script page

The Script page in the Options dialog allows you to set preferences for the OpusScript programming language.

 

There are three areas to the Script page, these are:

  1. Script Console panel – the Script Console is a small dialog that contains any error messages or information you have sent to it using the Debug.trace function. This panel deals with the Script Console and when it appears and what it shows when you preview your publication. The Script Console never displays in the published version of your publication only in the Opus Editor when your preview your publication.

  2. Script Editor panel – the Script Editor is the screen in which you type your OpusScript program. If you use OpusScript functions, you can have a tooltip appear showing the syntax for the selected function – you can edit which settings appear in the tooltip.

  3. Colours panel – the scripts you type in the Script Editor are colour coded for different types of entries, such as Keywords and Strings. You can edit the colour settings for the different types of entries to colours you prefer – these could be the same colours you have set in other programming tools, such as an HTML Editor.

To edit the Script Console panel settings:

  1. Use the Show console when preview starts option if you want the Script Console to automatically when you preview the page.

  2. Use the Show console when any output is written option will show the Script Console on screen when a Debug.trace function is written in your script.

  3. Use the Show console when "Errors" pane is written to option will show the Error tab of the Script Console on screen when your script does not work as expected, e.g. a variable cannot be found.

  4. Use the Hide the console when the preview finishes option if you want the Script Console to close when you return to the Opus Editor from previewing your publication. As the Script Console contains error messages that you will need to follow up on when in the Opus Editor, we recommend you don’t use this option.

  5. Use the Clear the console when preview starts option if you want any previous messages displayed in the Script Console to be removed before you preview your publication. It is useful to start with a clear console so that you know any messages in the console refer to your current preview.

  6. Use the Switch to output pane option if you want the Output tab to appear as the front tab in the Script Console.

To edit the Script Editor panel settings:

  1. Use the Show function tips option if you want a small tooltip like this to appear:

image\Options_Script_Tooltip.jpg

Note:
If this option is not ticked, the tooltip illustrated above will not appear and the rest of the options in this dialog will not work either.

  1. Use the Show return information if you want the tooltip to include the information your function will return.

  2. Use the Show extended description if you want the text description displayed in the tooltip along with the syntax.

  3. Use the Show parameter information if you want the parameters inside the brackets included in the tooltip.

To edit the Colours panel settings:

  1. Select the name of the script entry type (e.g. Keyword) from the list if you want to change its colour.

  2. Use the drop down colour well to select the new colour for the script entry type you selected.

Related Topics:

image\SHORTCUT.jpgIntroducing the Options dialog