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:19] – tondose | scripting [2020/07/10 09:23] – 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 '' | ||
- | === 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 22: | Line 24: | ||
Furthermore, | Furthermore, | ||
- | An overview of the provided procedures is supplied with each version of mAirList | + | An overview of the provided |
+ | |||
+ | |||
+ | ===== 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:// | ||
- | ==== Creating Code ==== |