6. Mastering mrScriptBasic
The previous section,
5. Running your first cleaning script, looked at a simple example of using mrScriptBasic to clean the case data. You use mrScriptBasic to write procedural code in the Event sections of your DMS file. There are several possible Event sections, each one being processed at a different time during the execution of the DMS file. Therefore each one is suitable for different types of tasks. For more information, see
Event section. However, the Event sections are not compulsory and there are many data management tasks that you can achieve without using an Event section.
mrScriptBasic is based on Visual Basic Scripting Edition (VBScript), which is in turn based on Visual Basic. However, the syntax of mrScriptBasic has some differences from VBScript and Visual Basic. If you plan to write only simple mrScriptBasic code, you might be able to meet your needs by just changing the sample DMS files that are provided with the UNICOM Intelligence Developer Documentation Library. However, if you plan to write more complicated procedures, it might be useful to learn mrScriptBasic outside of a DMS file. This section provides some suggestions on how to do that.
2 Read the other introductory sections in
mrScriptBasic overview. These introduce mrScriptBasic, and describe the main syntax differences between mrScriptBasic and VBScript and Visual Basic.
3 Read
Creating your first mrScriptBasic script. This section introduces the features in UNICOM Intelligence Professional that help you write mrScriptBasic scripts, and explain how to run an mrScriptBasic file in UNICOM Intelligence Professional.
5 Read the sections on each of the examples, because they draw attention to many things that you need to look out for when you start writing mrScriptBasic code.
6 Read
Debugging mrScriptBasic code for information about the features in UNICOM Intelligence Professional that you can use to debug mrScriptBasic files.
While you are doing this, see
mrScriptBasic overview and make full use of the debugging features.
8 Before you start writing mrScriptBasic code in the Event sections of your DMS files, read:
Using objects in the Event section: Describes which objects are automatically registered with the mrScriptBasic engine in the Event sections.
Data cleaning examples: Examples of using mrScriptBasic in the OnNextCase Event section to clean data.
Alternative method for running mrScriptBasic files
The UNICOM Intelligence Data Model includes the mrScript Command Line Runner, which provides an alternative way of running mrScriptBasic files. It also provides some debugging features. For more information, see
Command line runner: Debug options.
Next
See