User`s guide

E-Prime User’s Guide
Chapter 4: Using E-Basic
Page 139
Note the use of the "Else" condition in the script above. It is a good practice, and ultimately the
programmer’s responsibility, to cover all possibilities when writing script. If the values of the
Condition attribute are carefully entered, the "Else" condition should not be necessary. However,
it is better to consider the possibility of error than to have the program fail. Here, we put up a
message box to tell the experimenter a bad stimulus condition has occurred.
The properties of objects may also be set or retrieved through script as long as the property is not
read-only or design-time only (i.e., not able to be modified at runtime). For example, it is possible
to vary messages presented at runtime based on the speed of the response collected. Such a
procedure would require accessing one value (i.e., the reaction time from the input object
Stimulus.RT), and setting another (i.e., the text to be displayed by the object presenting the
message).
The GiveRTFeedback Inline object containing the script above sets the Text field for the
WorkFaster TextDisplay object at runtime. Thus, no value need be entered for the Text field in
the WorkFaster object in E-Studio.
4.4.5 Reference script results from other objects
After a variable has been entered into the experimental context as an attribute, that attribute may
then be accessed by other E-Prime objects occurring within the same scope. For example, once