VBScript normally executes from the first line to the last, doing what each line says to do. The "control flow" is a technical term for what code will get executed next. To change the order of lines that are executed, use "control flow blocks", such as those outlined in this tutorial.
- Main article: VBScript function
All the code so far would be executed immediately after the script control loads it. Subroutines and functions allow you to execute the code inside them at later times, such as when the bot fires an event.
- Main article: VBScript conditional block
If block and its relative the
Select block are conditional blocks commonly used in VBScript.
- Main article: VBScript loop block
While loops allow you to execute code multiple times.
- Main article: VBScript class
The class allows you to create custom objects to group a set of functions and variables together in a vaguely object oriented model. It even allows you to make properties as discussed in VBScript object.