Инструменты пользователя

Инструменты сайта



Writing scripts will allow fully change info output for your needs. Plugin use scripting engine with simplified Pascal-like syntax.

But important to remember, that complex scripts will slow down plugin work.

Data types

All variables are stored as variants. This meant that usually you can use them without additional type conversions. However in some cases explicit type casting can be required, this can be done with functions Integer, Number and String.

Also it's possible to use in expressions True and False constants.


It's no need to declare variables (except arrays), they are creates dynamically on first assignment. Variable type depends on the last value assigned, type checking is not carried out. So, if you assign string to numeric variable it's type will be changed.


Arithmetic+, -, *, /, ^ (power), SHL, SHR
Logical>, <, >=, ⇐, =, <>, AND, OR, NOT

Operators precedence standard, you can use parentheses.


Blocks are used where need to execute few different statements.



Simple condition. Chaecks <expression> result, if True, the <statement1> is executed, if False - <statement2> executed.

if <expression> then

Switch condition. Checks <expression> result for defined values. Can have else for all values not defined explicitly.

case <expression> 
 <value1>[,<value2>[, <valueN>]]:


Loop execute <statement> from <value1> to <value2>, with step 1.

for <value1>:=<expression> to <value2> do

Loop execute <statement> from <value1> to <value2>, with step -1.

for <value1>:=<expression> downto <value2> do

Loop execute <statement> while <expression> is true.

while <expression> do

Loop execute <statement> until <expression> is become true.

until <expression>;

Other operators

Continue loop. Can be used in loops only.


Break the loop. Can be used in loops only.


Exit from procedure or function. When calling while in main script, terminate script.


Go to label. In current time it's not recommend to use this operator in order to keep code understandable.

label <name>;
goto <name>;

User procedures and functions

Procedures and functions (in sense of the subroutines on interpreter language) are supported. The function heading specifies only names of formal parameters, without parameters types and pass method (var or value). Also, function's result types are not declared. To return function result you should assign value to variable «result».

If actual parameter is variable (not expression), it considered as var-parameter. In this case assigning new value to this parameter inside procedure or function will affect the actual parameter variable.

At the same time, all interpreter global variables inside a function or procedures looks like local variables, with the same initial values as global ones. You can change this values inside procedures (functions), but it's don't affect the global variables. All new variables created inside procedures and functions are local, and will be destroyed after exiting. Therefore, it is possible to use any names for local variables, without conflicts with the global variables.

Procedures are not return values:

MyProc([<expression1>[, <expressionN>]]);
procedure MyProc([<value1>[, <valueN>]]);

Functions return values in special result variable:

<value>:=MyFunc([<expression1>[, <expressionN>]]);
procedure MyFunc([<value1>[, <valueN>]]);

Function libraries

You can use function libraries, that can be loaded with uses and include operators.

uses only loads procedures and functions declarations that can be used in other scripts. The most common scenario.

uses "LibName";

include inserts text into the script from node funclib with given name,

include "LibName";
en/tcmediainfo/documentation/scripts.txt · Последнее изменение: 2019/02/21 16:59 — loopback

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki