VBScript block

From StealthBot Wiki
Jump to: navigation, search

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.

Functions

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.

Conditional blocks

Main article: VBScript conditional block

The If block and its relative the Select block are conditional blocks commonly used in VBScript.

Loop blocks

Main article: VBScript loop block

The For, Do, and While loops allow you to execute code multiple times.

Class

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.

See also