Scripting > mrScriptBasic overview
 
mrScriptBasic overview
mrScriptBasic is a programming language that enables scriptable access to UNICOM Intelligence components. mrScriptBasic is based on Visual Basic and Visual Basic Scripting Edition (VBScript), but unlike Visual Basic and VBScript, mrScriptBasic provides native support for the following:
Categorical variables
Market research data typically contains case data collected using categorical questions. These are questions that have a predefined list of responses or categories from which the respondent selects his or her answer. Like the UNICOM Intelligence Data Model, mrScriptBasic includes native support for data of this type.
Expression evaluation on categorical variables
Expression evaluation in mrScriptBasic is performed by the Evaluate component, which is part of the UNICOM Intelligence Data Model and which provides support for using Arithmetic operators and Comparison operators on categorical data.
Functions tailored to the needs of the market research industry
mrScriptBasic uses the UNICOM Intelligence Function Library, which is also part of the UNICOM Intelligence Data Model, and which includes many functions that can operate on categorical data. The function library is extensible and it is easy to add your own functions. See UNICOM Intelligence Function Library for more information.
Sections
mrScriptBasic can contain sections to group a series of sections together. In a future version of mrScriptBasic, you will able to use the Rot, Ran, and Rev keywords to rotate, randomize, or reverse sections before presentation. See Section for more information.
Enhanced object collection iteration
Special mrScriptBasic syntax enables you to specify a categorical value when iterating through an object collection. This provides a concise syntax that is tailored to the needs of the market research industry. See Object collection iteration for more information.
Dynamic property expansion
This feature enables you to access items in certain object collections as if they were a property of the collection object. For an example of using this feature in table scripting, seeDynamic property expansion.
Enhanced error handling
mrScriptBasic supports the On Error Goto statement and an enhanced Err object, which can return the line number in the script where an error occurred. See On Error for more information.
Value stack and Variable collection
mrScriptBasic provides programmatic access to a Value Stack and Variables collection, which expose the state of a script’s variables at any given instruction. UNICOM Intelligence is planning to use these features in a future release of UNICOM Intelligence Interviewer to re-start or roll-back an interview without having to replay the interview from the start.
These features mean that mrScriptBasic is an ideal scripting language for use with market research data. For example, mrScriptBasic makes it easy to script questionnaire logic and survey data cleaning routines.
See also
Learning mrScriptBasic
Introduction to objects
How does mrScriptBasic compare to VBScript?
How does mrScriptBasic compare to Visual Basic?
Visual Basic function equivalents
Working with foreign languages
mrScriptBasic FAQs and troubleshooting
mrScriptBasic examples
mrScriptBasic language reference
mrScriptBasic object reference
mrScriptBasic keyword summary