D&Do v. 1.0   Prev   Next   Top


Metascript Reference

Note: If you simply use D&Do with metascripts that are written by others, you do not need to read this section.

A metascript is a configuration file for D&Do that adapts a command line for its efficient use in a window-based desktop environment. It specifies these following metascript parameters:

Metascripts are standard text files. Each such file must start with the following line (without any space):
[metascript]

Each line of a metascript contains either a blank line, a non-interpreted comment or a parameter. A line that starts with the # character is a comment line. Parameter lines must start with the parameter name (no preceding whitespace). The parameter name ends with the colon. The related value comes immediately after the colon. A comment (starting with the # character) may be placed after the value on the same line of a Boolean or digit parameter.

The order of parameters is not important. If the same parameter is repeated then the last one is the only one taken into consideration. There are five types of parameters:

However, to better understand this documentation, it is important to review the components of a command line.

Command Line

Any typed text on a terminal, in a DOS box on the system prompt line or on a Run field becomes part of a command line. The operating system interprets it as a command and it will try to parse it under that assumption. The system responds properly if that command line contains proper words and follows a specific structure.

That command line starts with a recognized word by the system in that environment, either:

Among programs, there are those that require user's interaction while they are running (e.g. ftp and notepad), and there are others that do not (e.g. ping). The latter ones are non-interactive programs.

Among programs, there are script executors. The function of these programs is to execute the sequence of instructions that are contained in a script file (or simply, script). These instructions are either in a text form, such as a JavaScript file, or in a bytecode form such as a compiled Java or python scripts (i.e. in a file with the .class or .pyc respectively). There also, there are interactive scripts and non-interactive scripts.

VERY IMPORTANT: In this document, the word program or script implies its non-interactive form.

A command line starts with a "verb" or a program then continues with its argument list. An example is:
ping -n 2 localhost
ping is the program, the remaining text is its argument list.

However, if the program is a script executor (also known as script processor or script interpreter) the command line contains
(An example: cscript //nologo Tutorial\DirCreate.js "c:/temp" "My word" -C ):

Using the last definition, if the program is not a script executor, the program block contains only the program (or the "verb"), and the argument block contains the argument list of the program (or "verb") only.

In D&Do documents, the expressions "program block" and "argument block" have all of the above-described meanings.

 


Prev   Next   Top

Copyright (c) 2003 Marcel St-Amant