scripting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
scripting [2020/07/10 07:19] – tondose | scripting [2020/07/10 09:23] – tondose | ||
---|---|---|---|
Line 3: | Line 3: | ||
To meet user-specified tasks, mAirList is offering a powerful scripting engine which provides extended control functions. With it, users may write their own programmes and extend mAirList’s functionalities significantly. | To meet user-specified tasks, mAirList is offering a powerful scripting engine which provides extended control functions. With it, users may write their own programmes and extend mAirList’s functionalities significantly. | ||
- | The code resembles a subset of the // | + | The code resembles a subset of the // |
+ | |||
+ | **Note:** The full set of functions and procedures is featured only in the latest version of mAirList. Therefore, unaltered scripts originating from well-aged portions of the [[https:// | ||
+ | |||
+ | |||
+ | ===== Script Types ===== | ||
+ | |||
+ | Scripts can be established in two different ways: Either as a standalone or as a background script. | ||
+ | |||
+ | |||
+ | ==== Standalone Scripts ==== | ||
+ | |||
+ | Standalone scripts resemble a full delphi programme to be run by external action, such as the menu item '' | ||
+ | |||
+ | |||
+ | ==== Background Scripts ==== | ||
+ | |||
+ | For particular events within the mAirList programme, i. e. when a player is started or some marker is passed whilst playback, mAirList is calling an associated procedure by default. If no background script is available, no further action is taken. However, if a background script exists, the code therein will be executed on the said event. | ||
+ | |||
+ | Furthermore, | ||
+ | |||
+ | An overview of the provided background script procedures is supplied with each version of mAirList within the file '' | ||
+ | |||
+ | |||
+ | ===== Creating Code ===== | ||
+ | |||
+ | The code can simply be typed into a text editor. Windows-supplied '' | ||
+ | |||
+ | The structure of a simple Delphi/ | ||
+ | |||
+ | <code delphi> | ||
+ | |||
+ | const | ||
+ | // Constant declarations | ||
+ | |||
+ | VAR | ||
+ | // Variable declarations | ||
+ | |||
+ | { Subprogramme definitions } | ||
+ | |||
+ | procedure DoSomething; | ||
+ | begin | ||
+ | // Executable statements | ||
+ | end; | ||
+ | |||
+ | (* Main programme *) | ||
+ | |||
+ | begin | ||
+ | // Executable statements | ||
+ | end. | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Note** the different use of semicolon '' | ||
+ | |||
+ | **Comments** may be typed into '' | ||
+ | |||
+ | It is highly recommended that the code is structured by indenting the statements by two whitespaces at a time. Exaples can be found in the [[https:// | ||
- | Note that the full set of functions and procedures is featured only in the latest version of mAirLiTherefore, |