You will need
  • - text editor.
Instruction
1
Explore the features and capabilities of the runtime environment under which management must function in the generated script. So, if the script is suitable for embedding in a web page, it will intensively interact with the browser object model and the current document (BOM and DOM). The scripts developed for the execution of the Windows Script Host (for example, to automate administration tasks) will interact with its object model through which you can easily create and use other ActiveX and COM objects.
2
Develop algorithms that will be used when creating the main functionality of the script. Apply knowledge of the opportunities provided by the runtime environment. Identify the parts of algorithms that can be implemented in the form of procedures, functions, methods, classes. Identify data that can be encapsulated in classes.
3
Implement the procurement of the future script. In a text editor, create a file. Add the "stub" functions and procedures, as well as the Declaration of classes that contain their methods. In VBScript a procedure is declared using the Sub keyword followed by an identifier specifying the name. A sign of the end of the procedure body is offer End Sub. For example:

Sub MyProcedure(a, b)
End Sub

Similarly, by using the Function keyword to declare functions:

Function MyFunction(a)
End Function

Classes are declared using the Class keyword:

Class MyClass
End Class
4
Declare global / local variables and class members. This is done using the Dim:

Dim MyVariable

Pointing after the variable name, dimensionality, it is possible to declare arrays:

Dim MyArray(10) ' array of ten elements;
Dim MyArray(10, 15) ' two-dimensional array;
Dim MyArray() ' dynamic array.
5
Implement data processing algorithms by adding code to the functions, procedures and methods classes. Use offers Do - Loop, While - Wend, For - Each - Next, For - To - Step - Next for loops. Use If - Then - ElseIf - Else - End If as the operator of branching and the structure of the Select Case - End Select in as the operator of multialternative choice.
6
Add comments in their code. They need to follow after the single quotation mark character or the key word Rem. For example:

'the text of the comment
Rem the text of the comment