MonkeyTerm uses VBScript to access its own internal object model as well as any extern applications, files or objects. This enables you to do virtually anything you'd like, as long as you know how to write VBScripts :) To try and break it down a bit, you can say there are two different uses of the scripting. One is accessing the internal functions and methods of MonkeyTerm - this is stuff like reading the value of a variable, play a sound or changing the content on the web panel. How to do all this is explained in this section. The other use of the scripting engine is using the full potential of VBScript. With that you can do everything from opening a file on your computer to automating a Word document or access a database. General information about VBScript will teach you how to do all this. While this helpfile will have examples of how to use VBScript, it is recommended to read Microsofts own documentation on VBScript or look at other users scripts available for download at our official site.
Scripts are always enclodes in MT script tags <% %> except in specific .mos script files. Scripts can be written in a file with the .mos extention, then added to the session under the Add Scripts method (F8). Scripts can also be direcly written in a command field of aliases, actions, events etc. Scripts for public use or used by several alises, actions or even session should be placed in script files for reuseability, but short or single use scripts can be easily written directly in the commands part.
When scripting you often want to manipulate some input data and send some output data as result. The input to scripts are passed as parameters for function or sub calls, but some internal methods of MonkeyTerm like action or events have default input parameters. When ever a pattern has been matched, being it a simple or non-simple one, it will initialize some default variables. The variables are prefixed with a $ % or £ sign, followed by a number starting at 0 and counting up. The prefix defines the formatting of the variable.