-
Notifications
You must be signed in to change notification settings - Fork 0
Package Usage
This page describes how to configure an E-Prime experiment to use a custom Package file. As an example, this page will step through the installation and usage of the Draw Stimuli Package.
-
In order to use a package, make sure it is in the Packages directory in your my experiments folder. The full directory path should be
C:\Users\<your username>\Documents\My Experiments\Packages\DrawStimuli.epk2. -
Open up E-Prime and double click on the Experiment Object. On the Properties menu, navigate to the Packages tab on the top right. Click the add button to add the desired package to your experiment. Click on the DrawStimuli package, and then click Ok to add it.

Each Package contains a number of functions which can be called from within an E-Prime experiment to perform various tasks. The Draw Stimuli package contains functions to draw stimuli to the screen.
There are two ways to call a function: the Package Call Object, and in line E-basic scripts.
The Package call object can be placed on a procedure in order to make a call to a package function. Note that only functions which are advertised to the Package Call Object will appear in the available functions (functions which have a return value cannot be advertised to the object in this way, but instead must be called within E-basic scripts). The following steps demonstrate how to create and use a Package Call Object.
- Drag and drop a Package Call Object onto a procedure.

- Double click on the Package Call Object to open the properties window. In the General tab select the Package from the drop down of available packages, and select the routine/function from that package you wish to call. In this case, the function DrawImage is being called from the Draw Stimuli Package.

- The arguments to the function will automatically fill in with the default values as set by the package. Refer to the details test box to see the description of the function and what the various values are for. Some arguments will be optional, and some functions may not take any arguments.
It is also possible to call a function within an E-basic in line script. This is the preferred method for calling package functions, and all functions are available to be called this way, including those functions which return a value.
- Open up an inline script object on one of your procedures.

- Use the syntax
Call PackageName_FunctioName( arguments... )to call a function. Here is an example.
