Skip to content

AdoScript Introduction

AdoScript is the domain-specific scripting language of ADOxx. It is based on LEO, is executed procedural, and allows extension possibilities with low programming effort. Through AdoScript the user has access to a rich number of ADOxx functionalities.

AdoScript can be executed on different ways, so it can be used where it is needed:

  • As menu entry: For manual execution (e.g. transformation procedures, evaluation scenarios).
  • In events: If specific actions are executed, an AdoScript can be automatically called, e.g. a special dialogue replaces the standard dialogue window.
  • In the Notebook via Programmcall: Similar as for menu entries, but triggered from within the Notebook.
  • Automatically over Command Prompt: Trigger during startup of ADOxx and handover of AdoScript through the command prompt.
  • From AdoScript-Shell: As a debugging and development facilities to test code snipplets.
  • Via Service Calls: Sending AdoScript to a web-service exposed by an ADOxx-based tool.

AdoScript allows to access the ADOxx API through so-called "MessagePorts". That means messages are sent to specific MessagePorts and return result messages for further usage and application.

Structure of Documentation

Select the sections on the left side to get help on various topics. Sub-pages contain details on more focused aspects of these topics. A list of the corresponding sub-pages can be accessed by clicking on the

icon. The right side contains links to specific parts of the current page.

These pages provide a detailed reference documentation on AdoScript, the domain-specific language to implement modelling methods using ADOxx. The reference documentation is structured in 3 sections:

  1. AdoScript: providing details on general language constructs, like operators, variable assignment operations, iterations and conditions.
  2. MessagePorts: structured according to the message ports available in ADOxx, the commands available in each MessagePort are introduced.
  3. Events: events triggered by ADOxx during its use are defined and specified. Within the implementation, you can listen to these events and trigger actions.

Improvements: Please provide your feedback and improvement suggestions for the AdoScript documentation via the "Suggestions?" button in the top right.

Caution

The documentation is being updated, refactored, corrected and improved as needed. This includes paths and links to content.

Furthermore the documentation focuses on the most common use of ADOxx and ADOxx based tools. Feel free to explore the ADOxx platform and try things out which can go beyond "the most common use".

AdoScript Syntax

The AdoScript language is based on LEO. Therefore AdoScript code can also be considered LEO code. As such various concepts used in this grammar are further described in the LEO Syntax, like a sequence of elements (commands), expressions or the available functions.

Parts of the documentation use varName to denote the identifier of a variable, like on this page or in the AdoScript Commands. Variable identifiers follow the syntax of lc_identifier from the LEO-Syntax. Also consider the data types described in LEO Literals and Expressions.

AdoScript Grammar

  • Terminal symbols are written in bold.
  • Non-terminal symbols are written in cursive.
  • The end of a "production rule" is indicated by a single dot . symbol.
  • Parts between square brackets [ ] are considered optional and can be used once (i.e. zero to one).
  • Parts between curly brackets { } are considered optional and are repeatable (i.e. zero to many).
  • Alternatives are separated by a vertical bar |.
  • Three dots ... are used as placeholders to be replaced appropriate to the meaning (e.g. number value ranges).
  • A boldly written Attention: is not a terminal symbol, but provides important information.
Non-terminalDefinition
StatementSeq :{ Statement } .
Statement :Execute | Send | CC | System | Start | Call | Set | SetL | SetG | Leo | IfStatement | WhileStatement | ForStatement | BreakStatement | ExitStatement | FunctionDefinition | ProcedureDefinition | ProcedureCall .
Execute :ExecuteFile | ExecuteEx .
ExecuteFile :EXECUTE file: scriptText [ scope: ScopeSpec ] .
ExecuteEx :EXECUTE scriptText [ scope: ScopeSpec ] .
ScopeSpec :separate | same | child .
Send :SEND msgText to: msgPortName [ answer: varName ] .
CC :CC msgPortName [ var: varName ] [ debug ] [ raw ] anyLeoElement .
System :SYSTEM strExpr [ with-console-window ] [ hide ] [ result: varName ] .
Start :START strExpr [ cmdshow: CmdShow ] .
CmdShow :showmaximized | showminimized | showminnoactive | shownormal .
Call :CALL dll: strExpr function: strExpr { InputParam } [ result: varName ] [ freemem: strValue ] .
InputParam :varName:anyExpr .
Set :SET { VarAssignment } .
SetL :SETL { VarAssignment } .
SetG :SETG { VarAssignment } .
VarAssignment :varName:anyExpr .
Leo :LEO [ parseCmd] { accessCmd } .
parseCmd :parse: strinExpr .
accessCmd :get-elem-count: varName | set-cur-elem-index: intExpr | get-keyword: varName | is-contained: varName [ : strExpr ] | get-str-value: varName [ : strExpr ] | get-int-value: varName [ : strExpr ] | get-real-value: varName [ : strExpr ] | get-tmm-value: varName [ : strExpr ] | get-time-value: varName [ : strExpr ] | get-modifier: varName : strExpr .
IfStatement :IF booleanExpr { StatementSequence } { ELSIF booleanExpr { StatementSequence } }[ ELSE { StatementSequence } ] .
WhileStatement :WHILE booleanExpr { StatementSequence } .
ForStatement :ForNumStatement | ForTokenStatement .
ForNumStatement :FOR varName from: numExpr to: numExpr [ by: numExpr ] { StatementSequence } .
ForTokenStatement :FOR varName in: strExpr [ sep: strExpr ] { StatementSequence } .
BreakStatement :BREAK .
NextStatement :NEXT .
ExitStatement :EXIT .
FunctionDefinition :FUNCTION functionName [:global] { FormalFuncParameter } return: expression .
FormalFuncParameter :[ reference ] paramName : TypeName .
ProcedureDefinition :PROCEDURE [global] ProcedureName [ MainParameter ] { FormalProcParameter } { StatementSequence } .
MainParameter :TypeName : paramName .
FormalProcParameter :paramName : TypeNameOrReference .
TypeNameOrReference :TypeName | reference .
TypeName :string | integer | real | measure | time | array | undefined .
ProcedureCall :anyLeoElement .
ProcedureName :keyword .