E-Prime provides the Windowed Mode mechanism to allow the user to run an experiment in non-full screen mode for debugging purposes. Windowed mode facilitates the preview of an experiment, with the ability to start, pause, and stop the experiment, as well as the ability to observe variable, attribute, and script information within E-Run Experiment user interface window.
NOTE: Windowed Mode is intended for testing and debugging purposes. Collection of data in Windowed Mode is not recommended.
To configure an experiment to run in non-full screen mode, select the Windowed Mode option from the E-Run menu, or click the Windowed Mode button on the toolbar.
The Test Manager dialog will be displayed, presenting the configurable settings for the Windowed Mode feature, and other test configuration settings. The Test Manager dialog is also be displayed when selecting the Test option from the E-Run Menu, or the Test button on the toolbar.
The settings for Windowed Mode are located under the Run configuration heading (E-STUDIO: E-Run Test Mode ).
The Run Configuration settings permit the user to specify whether to run the experiment in windowed mode, to select the size of the window in which to display the experiment (i.e., Display window), and whether the windows (Display window and E-Run Experiment user interface window) will be able to be resized.
Run the experiment in windowed mode
Specifies whether or not the experiment will be run in windowed mode.
Display Device Scale
Restore from last run, percentage values
Defines the size of the window in which the experiment screens are shown. Percentage values scale the resolution of the display device by the selected percentage (see the Display device on the Devices tab within the Experiment Object). The Restore from last run option uses the previous
Allow display windows to be resized
Selection of this field allows display windows to be resized when running in windowed mode. If unchecked, display windows will not be resizable during program execution.
To enable windowed mode during experiment execution, check the checkbox next to “Run the experiment in windowed mode” and select the scaling option desired. By default, the “Restore from last run” option is selected to use the scaling value used in the last run of the experiment. If no previous scaling option is available (i.e., no previous runs), the window size assumes normal display size (i.e., 100%). Other selections (i.e., 25%, 50%, 100%, etc.) will result in a window size such that the display area is the resolution specified for the Display Device scaled by the selected factor. The aspect ratio of scaled windows is maintained.For example, a Display Device Scale setting of 50% for a Display Device configured at 1024x768 will result in a window size of 512x384 pixels at runtime.
The “Allow display windows to be resized” checkbox permits the windowed mode display to be resized at runtime. By default, this option is checked and windows may be resized at runtime. If this option is unchecked, the window cannot be resized at runtime.
The Test button at the bottom of the Test Manager dialog launches a test session based on the configuration as specified within the Test Manager dialog (e.g., at the speed specified by Clock Scale, including the objects as specified in the Quick Start window, etc.). Refer to the E-STUDIO: E-Run Test Mode  documentation article for information pertaining to E-Run Test Mode and the Test Manager dialog.
Upon test launch (i.e., press the Test button) the E-Run Experiment Window is displayed, overlaid by the E-Run dialog for entry of the Subject Number, as illustrated in the image below.
After entry of the required startup information (e.g., Subject, Session, etc.), a display window appears, reflecting how the experiment will appear at runtime. The size of the window is specified in the Display Device Scale field setting. The name of the display window represents the name of the Display Device (as specified in the Devices properties within the Experiment Object) on which the experiment screens are presented. The image below illustrates a windowed-mode test run of BasicRT, with the Display window showing presentation of the stimulus (i.e., “X”).
If multiple Display Devices are enabled/used, each device will appear in its own window, with resizing dependent on the “Allow display windows to be resized” setting. In addition, if previous run information is available, the positions of the windows from the previous run are restored (i.e., used). However, if a display window's restored/set size will not fit on the virtual screen at its restored position, the window is moved onscreen at the start of the experiment.
E-Run Experiment Window
At runtime, while the scaled window represents the experiment screens occurring during the running experiment, attributes and script variables may be monitored within the E-Run Experiment Window. Switching focus from the experiment window to the E-Run Experiment Window during a test run in windowed mode (i.e., clicking the E-Run Experiment window) permits the ability to Pause/Resume, safe Exit, Abort the experiment, or Step through the script via the buttons at the top of the window (refer to E-RUN: Terminating an Experiment  for information concerning the difference between safe exit and abort).
During a test session, when focus switches to the E-Run Experiment Window, the experiment will continue to execute. To interrupt experiment execution (e.g., Pause, Abort, Exit), use the buttons at the top of the E-Run Experiment Window. The Context and Script tabs permit observation of the current values of attributes and variables within the context, and currently executing script during a paused experiment.
During a Windowed Mode test session, the mouse remains visible to enable selection of windowed mode components (e.g., switching focus to the E-Run Experiment Window, buttons, etc.). However, if the mouse has been hidden for the experiment (i.e., the ShowCursor property has been set to “No“ within the Experiment object), the mouse cursor is displayed as a dot when the mouse hovers over a display window.
To pause experiment execution, switch focus to the E-Run Experiment Window and press Pause. When pausing and resuming an experiment, the Clock.Read value remains the same (i.e., the timing as logged within the data file is not affected by the pause). Experiment execution will be paused, and additional actions may be carried out within the E-Run Experiment Window (e.g., review values within the Context tab, enter Live Script, step through script execution, etc.). While paused, the Pause button is replaced by the Resume button. Pressing the Resume button will continue experiment execution from the point of the pause, and the Clock.Read value will resume.
The Step feature permits the user to “step” through execution of the script one line at a time on the Script tab when the experiment is in a paused state. The currently active line of script (at the time the experiment is paused) is highlighted in yellow on the Script tab. Press the Step button to advance the script to the next line in experiment execution. Each press of the Step button will advance the script one line.
While the Step feature will not affect experiment execution in the display window (i.e., while in a paused state, experiment execution will not continue), the location at which the experiment is paused may restrict the script available via the Script tab. For example, if paused during a loop that requires an event to occur to exit the loop (e.g., input), the Step feature will cycle through the script within the loop until the experiment receives input.
The Exit button permits safe termination of the executing experiment. During a safe exit, the currently executing object is terminated, any additional objects are skipped, and List objects discontinue sampling. During an Exit operation, a data file is created, providing available data up to the point the experiment is terminated (see E-RUN: Terminating an Experiment ).
If a test session is active, an Exit event terminates the Windowed Mode test session, returns to the E-Run Experiment Window, and highlights the final line of script within the Script tab (i.e., End Sub). If a test session is not active, the Exit button closes the E-Run Experiment Window.
The Abort button terminates an experiment immediately, without executing additional script to close out devices. During an Abort operation, an E-Prime data file (.edat3) is not automatically created. The E-Recovery application may be used to convert the flat text (.txt) data file to an E-Prime data file (see INFO: Recovering .txt files with E-Recovery ).
The Abort button is only available during an active test session, and prompts the user to confirm the operation. If confirmed, the test session is terminated, the E-Run Experiment Window is closed, and the application returns to E-Studio. Within E-Studio, the Full Script window is displayed in the Workspace, highlighting the location within the full script at which the experiment was terminated.
The Context and Script tabs permit the user to monitor attribute and variable values within the context, or to step through currently executing script during a paused experiment.
The Context tab permits the monitoring of attribute and variable values during a Windowed Mode test session via the Context tab below the buttons at the top of the E-Run Experiment Window. The variables within the experiment context are displayed in alphabetical order within the Name column, and the Value column indicates the current value of each variable. For example, to monitor the logging of the dependent measures related to the object collecting input (e.g., the Stimulus object in the image below), scroll down to the Stimulus properties in the Name column (e.g., Stimulus.ACC, Stimulus.CRESP, etc.) to observe the current values being recorded in the data file (i.e., for the current trial).
In combination with the Step feature, the Script tab permits the user to view execution of the script one line at a time when the experiment is in a paused state (See documentation for the Step feature above). The entire experiment script is displayed within the Script tab. Pressing the Step button locates the location of the currently executing script.
The Break Conditions fields permit the specification of a condition by which experiment execution will be paused, if/when the condition is met. To specify a break condition, launch a test session in Windowed Mode, then switch focus to the E-Run Experiment Window and Pause experiment execution. Set the condition using the fields described in the table below.
Field Possible Values Description Attribute Attribute or variables occurring within the experiment context. Specifies the attribute/variable for which a break condition will apply. Double click the field to enter edit mode, and select the attribute/variable name from the dropdown list associated with the field, or type a value directly into the field. Comparison Mode (blank), contains, does not contain, starts with, ends with, does not start with, does not end with, is, is not, equals, does not equal, less than, less than or equal, greater than, greater than or equal Specifies the mode by which the value for the attribute/variable will be evaluated. Double click the field to enter edit mode, and select the comparison mode using the dropdown list associated with the field, or type the first letter of a selection directly into the field to cycle through the options beginning with that letter. Comparison Value User-entered string values Specifies the value used to determine the break condition. Double click the field to enter edit mode, and type the comparison value directly into the field.
Attribute or variables occurring within the experiment context.
Specifies the attribute/variable for which a break condition will apply. Double click the field to enter edit mode, and select the attribute/variable name from the dropdown list associated with the field, or type a value directly into the field.
(blank), contains, does not contain, starts with, ends with, does not start with, does not end with, is, is not, equals, does not equal, less than, less than or equal, greater than, greater than or equal
Specifies the mode by which the value for the attribute/variable will be evaluated. Double click the field to enter edit mode, and select the comparison mode using the dropdown list associated with the field, or type the first letter of a selection directly into the field to cycle through the options beginning with that letter.
User-entered string values
Specifies the value used to determine the break condition. Double click the field to enter edit mode, and type the comparison value directly into the field.
When a break condition is met, the experiment execution is paused, and the break condition is highlighted within the E-Run Experiment Window. At this point, the Context and Script tabs may be investigated to examine attribute/variable values and/or script execution, the experiment may be terminated using the Exit or Abort buttons, or single line script commands may be entered into the Live Script field.
To resume experiment execution following investigation of a break condition, press the Resume button.
Multiple Break Conditions may be entered during a test session. For example, conditions could be created to break according to a specific accuracy (i.e., incorrect response) to evaluate dependent measures, or according to a specific stimulus (e.g., Stimulus = X) to evaluate attribute values being logged via the Context tab. To enter multiple break conditions, simply complete the first break condition, and a second line becomes available for entry.
To remove a break condition, simply deleted the value entered into the Attribute field, and the accompanying fields will be deleted.
The Output field is used similarly to the Debug tab in the Output window within E-Studio. The Output field may be used to display debugging information through the use of the Debug.Print command. Placement of an InLine object calling the Debug.Print command within the experiment will, during a Windowed Mode test session, display the requested information to the Output field in the E-Run Experiment Window when the command is executed.
Additionally, events occurring via the Live Script field are reflected within the Output field, including single line script statements, results of retrieval commands, and errors resulting from Live Script entries (see below).
The Live Script field permits the ability to enter single line script statements during a paused experiment. To enter script, type a single line command directly into the Live Script field, and press the Evaluate button to run the command. The requested command, as well as the result of a retrieval command (e.g., GetAttrib) will be displayed in the Output field within the E-Run Experiment Window.
The result of a command affecting the execution of the experiment (e.g., setting the display properties of an object), will be reflected during program execution.
Errors and Restrictions
If the requested Live Script generates an error, an error message will be displayed within the output field. The image below illustrates an error generated by a mistyped “Print” command:
Additionally, the Live Script field restricts the use of certain commands (e.g., commands affecting the display, canvas operations, Draw and Run methods of an object, etc.). If a restricted command is entered into the Live Script field, an error will be written to Output indicating that the command cannot be evaluated.
Terminating Windowed Mode
At the conclusion of normal experiment execution, E-Prime returns to the E-Run Experiment Window and highlights the final line of script within the Script tab (i.e., End Sub). To terminate an experiment prior to normal completion, switch focus to the E-Run Experiment Window and press either the Exit or the Abort button. Refer to the Exit and Abort button sections above for information pertaining to behavior associated with each event.
When an experiment is run in test mode, a “TestMode” attribute is added to the data file, and is assigned the value of “True.” Additionally, if Windowed Mode is enabled, an “Experiment.Windowed” attribute is added to the data file, and is assigned the value of “True.”