Why Use E-Basic?
E-Studio is a robust application, with E-Basic as the underlying scripting language. Specifically, the graphical design created in E-Studio is translated to E-Basic script when the experiment is generated.
By utilizing the various objects in E-Studio, users can implement a wide range of experiment designs. However, E-Studio’s objects cannot support all experiment designs. That is where E-Basic is useful. If E-Studio does not provide an object that supports the needs of a particular experiment, then E-Basic affords the ability to accommodate individual user’s unique needs.
E-Studio provides the foundation for experiments in E-Prime 3.0. It is recommended that all users, regardless of their programming expertise, take full advantage of the graphical design interface in E-Studio rather than writing complex E-Basic scripts. E-Studio’s graphical interface can do most, if not all, of the work. Many users will not even need to use E-Basic.
The majority of all experiments can be done using E-Studio’s graphical design interface. The basic structure of almost all experiments includes blocks of trials within a session. It is more efficient to use the E-Studio design interface to set this up by dragging and dropping icons onto procedural timelines than it is to write the equivalent script.
E-Basic is the underlying scripting language of E-Prime 3.0, and the power of the E-Prime 3.0 system. Where E-Studio leaves off, E-Basic may be used to extend the system. This is similar to the use of Visual Basic for Applications within the Microsoft Office suite of applications. When E-Basic is used in conjunction with E-Studio and E-Run, power and flexibility abound (SCRIPTING: Introducing E-Basic ).
E-Basic really excels when used to extend the functionality of E-Studio. For example, the ability to run a minimum number or trials and then exit based on a percentage correct criterion is functionality that not all users require, and for which there is no graphical option. However, this functionality may be accomplished through a few lines of E-Basic script strategically placed in an InLine object or two. The following example illustrates most of the script necessary to evaluate a criterion-based exit after a minimum number of trials.
NOTE: This example is intended to illustrate the readability of E-Basic script only, and is not a complete example. The script shown in this example must be used in conjunction with an E-Studio file that includes other objects, such as a FeedbackDisplay object.
Upon reading this script carefully, it is not difficult to guess what it is supposed to do. One of the nicest features of E-Basic is that the language is similar to ordinary English.
For more information view the E-Prime Command Reference for specifics involving E-Basic (https://pstnet.com/ecr).
OVERVIEW: Extending Experiments with Script