Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
scripting [2020/07/10 09:23] – tondose | scripting [2020/07/10 09:33] – tondose |
---|
====== Scripting ====== | ====== Scripting ====== |
| |
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. | {{:wiki:zeichen_123_-_arbeitsstelle_stvo_2013.svg.png?50|}} |
| |
| 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 expand mAirList’s functionalities significantly. |
| |
The code resembles a subset of the //Delphi/TurboPascal// language, for which a comprehensive and well-structured reference can be found under [[http://delphibasics.co.uk/|delphibasics.co.uk]]. mAirList-specific functions and procedures are to be found – formatted as Windows help file – [[https://www.mairlist.com/download/current/mAirList/v6.1/scriptinghelp/mAirListScript.chm|here]]. | The code resembles a subset of the //Delphi/TurboPascal// language, for which a comprehensive and well-structured reference can be found under [[http://delphibasics.co.uk/|delphibasics.co.uk]]. mAirList-specific functions and procedures are to be found – formatted as Windows help file – [[https://www.mairlist.com/download/current/mAirList/v6.1/scriptinghelp/mAirListScript.chm|here]]. |
**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://community.mairlist.com/|mAirList Support Forum]] may be prone to cause issues. | **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://community.mairlist.com/|mAirList Support Forum]] may be prone to cause issues. |
| |
| ---- |
| |
===== Script Types ===== | ===== Script Types ===== |
An overview of the provided background script procedures is supplied with each version of mAirList within the file ''Background Script Template.mls''. | An overview of the provided background script procedures is supplied with each version of mAirList within the file ''Background Script Template.mls''. |
| |
| ---- |
| |
===== Creating Code ===== | ===== Creating Code ===== |
| |
The code can simply be typed into a text editor. Windows-supplied ''notepad.exe'' does the trick flawlessly, however, for major projects the use of some dedicated code editor, like [[https://notepad-plus-plus.org|Notepad++]] might be considered. The finished code is to be saved in UTF-8 format into a file **with the extension ''.mls''**. | The code can simply be typed into a text editor. Windows-supplied ''notepad.exe'' does the trick flawlessly, however, for major projects the use of some dedicated code editor, like [[https://notepad-plus-plus.org|Notepad++]], might be considered. The finished code is to be saved in UTF-8 format into a file **with the extension ''.mls''**. |
| |
The structure of a simple Delphi/Turbopascal programme is as follows: | The structure of a simple Delphi/Turbopascal programme is as follows: |
// Constant declarations | // Constant declarations |
| |
VAR | var |
// Variable declarations | // Variable declarations |
| |
</code> | </code> |
| |
**Note** the different use of semicolon '' ; '' and period '' . '' in subprogramme and main programme respectively. | **Note** the different use of semicolon '';'' and period ''.'' in subprogramme and main programme respectively. |
| |
**Comments** may be typed into ''{''curly brackets''}'', a combination of ''(*''parentheses and asterisk''*)'' or behind a ''<nowiki>//</nowiki>'' double slash. While the former two can be expanded over multiple lines, the latter works for a single line or part of it only. | **Comments** may be typed into ''{''curly brackets''}'', a combination of ''(*''parentheses and asterisk''*)'' or behind a ''<nowiki>//</nowiki>'' double slash. While the former two can be expanded over multiple lines, the latter works for a single line or part of it only. |
| |
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://community.mairlist.com/|Support Forum]], for now in German language only. {{:wiki:zeichen_123_-_arbeitsstelle_stvo_2013.svg.png?nolink&200|}} | It is highly recommended to structure the code by indenting the statements with two whitespaces at a time. [[https://community.mairlist.com/t/scripting-hilfe-grundkurs-1-wie-schreibe-ich-code/12387|A beginner’s tuorial|]] can be found in the Support Forum, however, at the time being, in German language only. {{:wiki:zeichen_123_-_arbeitsstelle_stvo_2013.svg.png?nolink&20|}} |
| |
| |
| |