9 Common Mistakes in E-Prime
The PST support team has identified 9 E-Prime design pitfalls and how to avoid them. The wide range of design possibilities in E-Prime can be a double-edged sword, allowing room for bad habits to form. Most mistakes can be avoided by studying this list and the accompanying articles in the PST Knowledge Base.
- Pixels instead of percentages
Avoid using pixel values when setting the location of Sub-Objects. Building experiments that can easily transfer between machines is just good practice and nothing is more aggravating than worrying about proper display resolutions.
WHAT’S THE PROBLEM Experiment appearances may change when run on different display resolutions.
WHAT’S THE SOLUTION Use percentage values in the ‘Frame’ tab when setting the location of your Sub-Objects.
- Not changing names in Object-based script
When changing the name of any Object in E-Studio always remember to check all InLine Objects and User Script for references to specific E-Object names. Some E-Objects, like Feedback Objects, automatically sync with new names, possibly giving users the false impression that other names will follow suit.
WHAT’S THE PROBLEM Changing an E-Object’s name invalidates any InLine or User Script that uses the old name.
WHAT’S THE SOLUTION Check the User Script and any Inline Objects when you change an object’s name.
- Keeping unused objects in “Unreferenced E-Objects”
Before running or testing an experiment, check the “Unreferenced E-Objects” area to delete any unneeded E-Objects from your experiment. Unreferenced E-Objects can still cause a number of errors if E-Prime is referencing them through InLine or User Script.
WHAT’S THE PROBLEM E-Objects deleted from the Session Procedure will stay in the “Unreferenced E-Objects” section and may cause errors.
WHAT’S THE SOLUTION Delete any unnecessary E-Object from the Session Procedure then delete it from Unreferenced E-Objects to remove it entirely.
- Disorganized resource files (movies, images, sounds)
Keep all files related to an E-Prime experiment together. This allows easy portability of experiments between computers and E-Prime automatically locates files stored in the same location as the experiment file.
WHAT’S THE PROBLEM Missing image, video, or sound files will stop an experiment from running.
WHAT’S THE SOLUTION Keep all of your media files in the same folder as your experiment file. If there are several media files, place a folder named “Resources” in the same location as your experiment file to keep things organized.
- Not Recycling E-Objects
Cut down the number of unique E-Objects as much as possible. It’s much easier to modify 2 display objects rather than 20.
WHAT’S THE PROBLEM Creating, organizing, and modifying several E-Objects is time consuming, confusing, and can lead to errors.
WHAT’S THE SOLUTION Recycle E-Objects wherever possible. Modify stimuli through the use of List Objects and attribute references. Familiarize yourself with our tutorial videos to get comfortable using attributes.
- Thinking locally, not globally
Use the User Script whenever you are defining variable names so they hold across the entire experiment.
WHAT’S THE PROBLEM Variables set in one procedure do not transfer across an entire experiment.
WHAT’S THE SOLUTION Declare your variables in the User Script and simplify the scripting process.
- InLine Script lacking indentation
Make your script easy to read by hitting the tab button. For example, anything between ‘If Then’ and ‘End If’ should always be indented, the same goes for ‘Do While’ Loops.
WHAT’S THE PROBLEM Script becomes even more confusing and difficult to read or modify if indentation isn’t used.
WHAT’S THE SOLUTION The beginning and ending of statements should be the only portions without indentation. Actions between, for example ‘If Then’ and ‘End If’, should be indented for readability.
- “Match Desktop Resolution at Runtime” across displays of different sizes
Limit variability by setting a specific resolution in the Device Property Pages and double click on the Display icon to change the settings.
WHAT’S THE PROBLEM Experiments running on a display resolution of 1600 x 900 will look different on a display resolution of 1280 x 720. Some Sub-Objects may not even appear on screen.
WHAT’S THE SOLUTION Go into Display Device Properties and set a specific resolution for the experiment which will apply to all displays.
- Making multiple experiment files for multiple Sessions
For experiments that require multiple sessions, many users create multiple experiment files. However, using a counterbalanced List replaces the need for multiple experiment files. StartupInfo prompts allow users to run different sessions by simply changing the value entered for either Subject, Session, or Group.
WHAT’S THE PROBLEM Users creating multiple experiment files.
WHAT’S THE SOLUTION When multiple sessions are required, use a Session List counterbalanced by a Session. With Startup Info prompts you can run different Sessions by entering different values.