Syntax Diagrams

Syntax Diagrams

Syntax Diagrams

This documentation uses syntax (or “railroad”) diagrams to show the structure of the commands. They provide a graphical way of showing mandatory and optional parameters, or parts of, a command.

Graphical Representation

A syntax diagram shows the “paths” through a command, it consists of an entry point, at the left, and an exit to the right. In between is shown the name of the command and the possible path(s) through its parameters.
The simplest syntax diagram consists of a command with no parameters. E.g. the UnSelect command.

Command names are shown in the syntax diagrams inside single quotes. These quotes are not used when writing the script. A valid script line with the UnSelect command is simply:

UnSelect

Mandatory or Optional Parameters

Commands may have mandatory or optional parameters, identified by the branching of the paths.

For example, the OnError command must have either Terminate or Continue as its first parameter and may have AlertUser or nothing as its second parameter.

Nested Syntax Diagrams

Syntax diagrams may be nested, i.e. a single entry in one diagram may have its own separate syntax diagram. Nesting helps remove clutter from diagrams and allows the reuse of common features.

In the syntax diagrams in this document, text within quotes, e.g. 'OnError' is the literal text expected in a script.

If the node of a syntax diagram does not contain quotes then it means that the value represents a nested state.

The diagram below shows that a string parameter may be either a constant string value (one wrapped with quotes) or may be the value of a bookmark attribute.

String (Text) Literals

Literal strings are text that you wish to pass straight through to a command, i.e. the text is not interpreted in any way.

Types of Strings

Strings may either be literal (fully defined in the script) or may come from values stored in bookmark attributes. Both are treated the same way, except that bookmark attributes are not enclosed in quotes.

String Syntax

Strings are enclosed in double quotes (“).

To use the double quote within a string use it twice (“”).

Strings (including bookmark data) are automatically concatenated. E.g. "A" "B" is output as "AB".

Examples:

Basic:

"Hello World" is output as Hello World

Embedded quotes:

"Hello ""World""" is output as Hello "World"

Concatenation:

"String1" ":" "String2" is output as String1:String2

Integration with bookmark attributes

If the bmUsername attribute is JackJones then

"Username is " bmUsername becomes Username is JackJones

    • Related Articles

    • Desktop Scripting

      Structure of a Script A Desktop DSL Script has the following functional sections (not all are required for all apps): Error Directive Determines the impact of errors on the script run. Process Start and Identification Ensures the correct windows ...
    • Commenting Desktop Scripts

      The Desktop Scripting Language supports both inline and block comments. Inline Comments C# / C++ style single line comments are supported. Any text starting with two “/”s is ignored to the end of the line. Example: // This is a comment UnSelect // ...
    • Desktop Scripting Overview

      Purpose The My1Login Desktop Scripting language is a Domain Specific Language (Desktop DSL), targeted at controlling and responding to Windows desktop applications, with the aim of injecting user credentials that are stored in the My1Login system. It ...
    • My1Login Desktop Client Overview

      Introduction The Desktop Client (DTC) is My1Login’s Windows solution for integrating Single Sign On with legacy (desktop, terminal) applications and web based applications. The Desktop Client runs on the user’s desktop. It monitors the processes ...
    • Defining a Desktop App Template

      Desktop Template Definition The desktop application template is defined in the My1Login admin area (the script has been omitted from this view). Setting Explanation Name The template name, user bookmarks have their title defaulted to this value. ...