If - Else - EndIf

Flow control commands are used to execute some parts of code depending of a condition, or iterate a part of the code if a condition isnt true, this is a critical part of programs without these functions are impossible to make a program.

If Condition is True execute Instructions block 1 [Else if is not True execute Instructions block 2].

Syntax:
If Condition
[Instructions block 1]
[Else]
[Instructions block 2]
EndIf
Conditions can be variables, commands, dll-functions or directs values, and conditions operations are:
=Equal
!=Not Equal
>Higher than
<Lower than
>=Higher or equal than
<=Lower or equal than
You can merge 16 conditions with And, Or, Xor, Not operators. Priority are defined with brackets "(" and ")", to execute brackets contain first. VMM Basic execute conditions from left to right:

If Wnd=2 And Var!=23 Or Test=2 And Btn=4
This will be executed on this form:

[1] = Wnd=2 And Var!=23
[2] = [1] Or Test=2
[3] = [2] And Btn=4