Meridian Enterprise Script Editor

The Meridian Enterprise Script Editor is a simple text editor for entering VBScript code, as shown in the following figure. This code is saved in the Meridian vault configuration. The code for each configuration expression is saved as a separate code block and all of the Meridian event procedures code is saved as one code block. To edit a code block, open the Meridian Enterprise Script Editor from the place in Configurator where the code block is applied.

A screen shot of the script editor with five labels pointing to different parts of the editor. The description of the parts is in the table below.

The Meridian Enterprise Script Editor is composed of several elements described in the following table.

Features of the VBScript editor
Number Name Description
1

Toolbar

Contains buttons for transferring text with the Clipboard, searching code for text.

2

Object Browser

Displays a tree view of the VBScript built-in functions and constants, and the Meridian objects, properties, methods, functions, and constants. For information about the Meridian objects, see Meridian Object Model. For information about the Meridian functions, see Understanding the Meridian functions.

3

Code pane

The area for entering VBScript code.

4

Events and Procedures

Displays a tree view of the Meridian events and any custom functions that have been defined. For information about the Meridian events, see Understanding Meridian event procedures. This view is only available when editing the Meridian events, as described in Create and Edit Event Procedures.

5

Status bar

Displays indicators for the current script's validity (if the Use validation option is enabled) and the current cursor position. The performance of loading large scripts can be improved by disabling Use syntax coloring option.

The commands for each icon on the toolbar are described in the following table.

Toolbar icons
Icon Shortcut Description

Button that looks like a piece of paper with an arrow pointing to the right.

Ctrl + O

Load a file from disk to completely replace the current code block. Available only when editing the Meridian events, as described in Create and Edit Event Procedures.

Button that looks like a floppy disk.

Ctrl + S
F12

Save the current contents of the editor to a file on disk. The default file name that is calculated includes the current date. Available only when editing the Meridian events, as described in Create and Edit Event Procedures.

Button that looks like a pair of scissors.

Ctrl + X

Cut the selected text to the Clipboard.

Button that looks like two pieces of paper.

Ctrl + C

Copy the selected text to the Clipboard.

Button that looks like a clipboard with a piece of paper attached. Ctrl + V Paste text from the Clipboard.
Button that looks like a pair of binoculars. Ctrl + F Find specific text in the current code block. Available only when editing the Meridian events, as described in Create and Edit Event Procedures.
Button that looks like an arrow pointing right on a green background. Ctrl + G Go to a specific line number in the current code block.

The Meridian Enterprise Script Editor can help you to build correct VBScript code by listing all available objects, functions, and constants for easy selection so that you do not need to remember the names of every Meridian object and their properties and methods; and every VBScript function and constant. When you select an object in the Object Browser, the editor enters the object name for you in the code pane automatically. When you then enter a period, which delineates a subclass of the current object, the Meridian Enterprise Script Editor displays a popup list of the current object's properties and methods for selection. Also, when you select a method name from the list and then enter a parenthesis to indicate that you will specify the parameters of the method, the editor shows a tooltip in the code pane of all required and optional parameters to assist you.

As you enter VBScript code in the code pane, the Meridian Enterprise Script Editor constantly monitors the syntax of the code. When the current code is correct, the status bar displays Script is valid. If the syntax of the current code is incorrect, the status bar displays the error and the location of the error so that you can easily correct it. If you are entering a configuration expression, when you are finished entering code, you can test the code by clicking the Evaluate the expression button Button that looks like a calculator.. The Meridian Enterprise Script Editor will evaluate the expression and display the result so that you can confirm that the result is what you expect.

2021 R2