# This is a sample config file for MetriTextPrompter. # It works for MTP versions 1.2 and above. # The structure of an MTP config file: # MTP reads its config files in a linear fashion, one line at a time. # Lines enclosed in square brackets ('[', ']') are considered commands. # All other lines are considered 'prompts', i.e., information # to show to the participants. # Blank lines or lines that begin with a '#' are ignored. # MTP's default behavior is to read a line from the config file, # give it to the participant as a prompt, and give the participant # a single-line textbox to type the prompt in. This behavior # can be modified using MTP's commands. # MTP has two kinds of commands: the first uses the syntax: # [Set X = y] # where X is an MTP keyword and y is a value you want X to take. # There are a number of keywords, most of them illustrated in the # example file below, that are used to direct MTP's behavior. # When one of MTP's keywords is given a value using a [Set] command, # this value is retained until you set it to something else. # There are other MTP commands that are still enclosed in [] but apply # only to the next prompt. These can be used to show the user a message, # play a sound file, etc. # Below are illustrated most MTP commands that you need to create your # own experiments. We suggest you create copies of this file, edit these, # and run MTP with these until you are comfortable. We recommend you # use MTP's syntax-checking mode to test changes to the configuration # file. It can be invoked by using a command-line parameter: # mtp.exe /test=syntax /config_file=myMtpConfigFile.txt # The syntax-checking mode provides more informative error messages. ############################# # Sample illustrated MTP file ############################# # The name of the experiment. Use this to label the data with # any alphanumeric string you want. It will help you distinguish data # from various experiments. This command is not optional. [Set ExptName = Demo_Experiment] # The location where you want the collected data (log files) to be stored. # The participant's id, experiment name, and a date+timestamp # will form the full file name. This can be relative to the binary path. # This command is not optional. #[Set DataDirectory = C:\MTP\Data] #[Set DataDirectory = ..\Data] [Set DataDirectory = Data] # Prompter window properties # All colors in MTP are set using hexadecimal Blue-Green-Red format. # Hexadecimal values increase from 00 to 99, then AA to FF. # For example, white is &HFFFFFF, whereas black is &H000000. # &HBBDDFF has the value "BB" for blue, "DD" for green, and "FF" for red. # If you search on the Web, you will find colors in RGB format. # Just re-order your desired color code so that it is in GBR, not RGB. [Set BackgroundColor = &HBBDDFF] # The MTP window size is in pixels. The window can be resized # at run-time. [Set WindowWidth = 600] [Set WindowHeight = 440] # Prompt and Box Font properties # "Prompt" refers to the label where MTP displays prompts to the participant. # "Box" refers to the box supplied by MTP for the participant to type in. # You can set the font face, size, bold/not bold, and font color for both # the Prompt and the Box. # The font is any valid font name on your Windows machine. # The size is in points. # The color is in hexadecimal BGR format (see above for details). [Set PromptFont = Times New Roman] [Set PromptFontSize = 15] [Set PromptFontBold = true] [Set PromptFontColor = &h000000] [Set BoxFont = Times New Roman] [Set BoxFontSize = 15] [Set BoxFontBold = true] [Set BoxFontColor = &H000000] # Error-checking: What counts as an error # MTP can check if the participant's typing matches the prompt. # "WholeString" checks the typing only when the participant finishes typing # and presses "OK". If the participant makes mistakes but corrects them # (by using BackSpace or Delete keys), MTP will accept the final typed text # as long as it matches the prompt.. # "EachKey" checks the typing continuously, by matching each key typed to the # prompt text. As soon as a non-matching key is pressed, MTP will record # an error and make the participant re-type the prompt. # "None" turns off all error-checking. # Here we are setting the initial error-checking mode. We can change it during # the experiment. [Set ErrorCheck = WholeString] # Error-checking: The number of errors that MTP will accept before moving on # to the next prompt. ErrorCap only applies to the two ErrorCheck modes # listed above. It does not apply to Check* commands # (described later in this sample configuration file). [Set ErrorCap = 5] # Error-checking: MTP can play a sound file each time an error occurs, # to inform the user. The path can be absolute or relative to the MTP binary. #[Set ErrorSoundFile = C:\MTP\Sounds\Bell.wav] [Set ErrorSoundFile = Sounds\Bell.wav] ## Start of experiment ## # Play a sound: MTP will play the provided wave file. MTP will continue to function # while the sound is played (asynchronous playback). # The path can be absolute or relative to the MTP binary. [PlayWav Sounds\fanfar1.wav] # The Message command tells MTP to not expect any participant input # at the next screen. No text boxes are therefore shown. [Message] If you don't hear some music right now, please inform the experimenter. # Note the use of an underscore '_' to break a long prompt. # MTP prompts must be on a single line. # Each new line is considered a new prompt. # Long prompts may be joined by '_' to create a single prompt that # is spread across multiple lines. # This helps the readability of configuration files. [Message] Welcome! During the following experiment, you'll see words and phrases _ appearing one at a time on the screen, which you should type in the _ white box provided. Some words or phrases may be repeated. _ Press the "Enter" key to continue. _ (This will click on "OK" to advance the screen.) [Message] We are now ready to start. To see the first word, press "Enter". # Each line that is not a command will be displayed as a *prompt* to # the participant, with a single-line textbox for the participant to type in. hester hester hester # The error-checking mode can be changed at any time during the experiment. [Set ErrorCheck = EachKey] J*p2leP4>F # Prompts can be words or sentences. Type in this sentence very carefully. # The MultiLineTextBox command produces a multi-line, instead of single-line, # text box on the next screen, for the participant to type in. The parameter # sets the height of the box in terms of the number of lines of text it will # initially hold. The text box will scroll if more text is typed. # But first, we tell the participant how to navigate a MultiTextBox screen. # If you don't tell them to press "Tab" and "Enter" when they are done typing, # they will get stuck on the screen because the "Enter" key in # MultiLineTextBox mode produces new lines, and does not press "Ok". [Message] On the next screen, you will see some text. Please copy it in the _ provided text box. When to get done typing, press "Tab" and _ then "Enter" to continue. This presses the "Ok" button. # Now we create the multi-line text box. [MultiLineTextBox 5] # We take this opportunity to change the size and weight of the Prompt # and Box fonts. [Set BoxFontSize = 12] [Set BoxFontBold = false] [Set PromptFontSize = 12] # We are also changing the error-checking mode to suit our goals. [Set ErrorCheck = None] # MTP can check how many characters a user has typed. This can be # thought of as a loose form of error-checking. It is useful because # participants may find it hard to type long passages without making # minor mistakes. If the participant types less than this, s/he will # get a pop-up box asking them to type more. # ErrorCap does not apply to CheckNumChars. [CheckNumChars 100] # The default pop-up message is "Please type more sentences.". You # can change this if you want: [Set CheckNumCharsErrorMsg = You did not type enough of the prompt. Please copy more of it.] # Note that because this command uses the "Set X = y" syntax, # this setting will remain valid until you change it or # the experiment ends. # The first prompt after the FreeText command is displayed on # the screen with a multi-line text box. Make sure you have enough # space to fit the prompt and the box on your screen, given the # window size, the font sizes, the length of the prompt, and # the height of the multi-line text box. Most people want to make sure their own welfare is being taken care of properly. _ This need will embrace such items as job security benefits, and final retirement. [Set BoxFontSize = 16] [Set BoxFontBold = true] [Set PromptFontSize = 16] # Here we will use another form of typing validation. # CheckContainsText checks if the participant's # typing contains the specified string. This is also designed # to be used when ErrorCheck is set to None. # The CheckContainsTextErrorMsg variable holds the message # that will be popped up to the participant if the typed text # does not contain the target string, in this case, "zucchini". # ErrorCap does not apply to CheckContainsText. # But first, we tell the participant what we want them to do; # instead of copying, we want them to create their own # response to our question. [Message] Instead of copying the following sentence, please respond to it. [Set CheckContainsTextErrorMsg = That's not the right answer!] [CheckContainsText zucchini] Please type in a sentence with the word "zucchini" in it. # [PlayWav D:\KeystrokeDynamics\MotionCapture\applause.wav] [PlayWav Sounds\applause.wav] [Message] You're finished with the experiment. Thanks for your participation!