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 08:24] – tondose | scripting [2020/07/10 09:24] – tondose | ||
---|---|---|---|
Line 8: | Line 8: | ||
- | ==== Script Types ==== | + | ===== Script Types ===== |
Scripts can be established in two different ways: Either as a standalone or as a background script. | Scripts can be established in two different ways: Either as a standalone or as a background script. | ||
- | === Standalone Scripts === | + | ==== Standalone Scripts |
- | Standalone scripts resemble a full delphi programme to be run by external action, such as the menu item | + | Standalone scripts resemble a full delphi programme to be run by external action, such as the menu item '' |
- | '' | ||
- | or the [[reference: | + | ==== Background Scripts |
- | + | ||
- | '' | + | |
- | + | ||
- | + | ||
- | === 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. | 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. | ||
Line 33: | Line 27: | ||
- | ==== Creating Code ==== | + | ===== 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 to structure the code by indenting the statements with two whitespaces at a time. Examples can be found in the [[https:// | ||
+ | |||
+ |