2.1 Adding a Script to the Script Library

The Script Library allows scripts to be edited and reused among various product features, including automations and algorithms. A script can be added to the Script Library simply by saving it to the /OperationsCenter_install_path/database/scripts directory. It then surfaces automatically as an option when scripts are defined or selected.

Operations Center no longer supports scripts that were written using interfaces that existed prior to the publication of interfaces based on the Extensible Services effort in the 3.1 release.

The browser provides a simple way to create and debug new scripts and save them to the Script Library.

To create a script:

  1. In the Explorer pane, expand Administration > Automation.

  2. Right-click the Scripts element and select Properties to open the Status property page.

  3. In the left pane, expand Administration.

  4. Right-click Scripts and select Properties.

    The Properties dialog box opens.

  5. Type a name for the script in the Scripts text box.

  6. Type the script text in the Script Editor text box.

    Text can be copied and pasted into this window from the Operations Center Script Debugger or another text editor. See Section 2.2, Using the Script Debugger.

  7. Click Syntax to display one of the following messages:

    • If the syntax of the newly created script is correct, the message indicates The script has no syntax errors.

    • If the script contains syntax errors, a message similar to the following displays. All errors found by the syntax checker display in this message, with line and column numbers to help locate the syntax error.

    For example:

  8. To evaluate the script, use the Operations Center Script Debugger.

    For more information, see Section 2.2, Using the Script Debugger.

  9. Click Apply.

    The new script is saved to the /OperationsCenter_install_path/database/scripts directory and can be accessed from anywhere that scripts are accepted.

  10. Click New to clear the Script Editor and create another script.