Skip to main content
Version: v4 (Stable)

Script Language Reference

The Alert Message Processor uses a Basic-like scripting language to process messages and trigger alarm operations. This reference documents all available keywords, operators, and functions.

What Scripts Are Used For

Scripts are programs executed by the Message Processor to extract significant information from incoming messages and trigger alert processes accordingly. Each script is associated with a prototype configuration file and can:

  • Extract alarm information from messages and activate or deactivate alarms
  • Acknowledge alarms
  • Dynamically create alarms from extracted data
  • Communicate with external systems via serial links, TCP/IP, or SMS
  • Process data from files, databases, or email mailboxes
  • Handle incoming and outgoing voice telephony calls (Vocal Server, v4.0+)

Available Categories

The scripting language is organized into the following categories:

CategoryDescription
DeclarationsVariable declarations (DIM), function and subroutine definitions (FUNCTION, SUB), and comments (REM)
Program Flow ControlConditional branching (IF/ELSE/ELSEIF) and loops (FOR, DO WHILE, DO UNTIL, LOOP WHILE, LOOP UNTIL)
Logical OperatorsBoolean and arithmetic operators: AND, OR, XOR, NOT, DIV, MOD, EXP
Math FunctionsMathematical operations and numeric utilities
String FunctionsString manipulation, parsing, and formatting
Array FunctionsArray creation and manipulation
File FunctionsFile reading, writing, and management
System FunctionsOperating system and environment interactions
Message Processor FunctionsFunctions specific to message processing and event handling
Alert APIFunctions for interacting with the Alert platform (tags, alarms, acknowledgments)
ObjectsObject types such as FILE, XMLPARSE, DBCONNECTION, MAIL, SNMPTRAP, and more
Vocal ServerFunctions for building voice telephony applications (v4.0+)

Script Structure

A script is a plain-text .prg file associated with a prototype. It follows Basic syntax conventions:

  • Variables are declared with DIM
  • Subroutines and functions are defined with SUB / FUNCTION ... END SUB / END FUNCTION
  • Comments begin with REM or a single quotation mark (')
  • Control flow uses IF/ENDIF, FOR/NEXT, and DO/LOOP constructs