The IsPending() method returns a Boolean value (i.e. True or False) which indicates whether the input masks on a particular object are pending (i.e. waiting for a response). This method is particularly useful when you want to execute InLIne script while an object is running and waiting for a response. For example, a While loop can be used in an InLine following the object that loops repeatedly as long as the input masks are pending. Any script you want to execute while the object waits for a response can be placed inside the While loop.
The object collecting the response must have its Duration property set to 0. All of the input masks must have their Time Limit property set to (infinite), and their End Action property set to (none). All of these properties can be found on the Duration/Input tab of the object's Properties pages. This causes E-Prime to draw the object on the screen and then immediately begin executing the InLine script following the object. The object will continue collecting responses while the script is running.
Example: On the TrialProc, you have an object named Stimulus which presents a text string to the subject and collects a response. The experiment does not proceed until the subject responds. After the object has been displayed for 5 seconds, you want to display a message that encourages the subject to respond quickly. After setting the Duration, Time Limit, and End Action properties on the Stimulus object as described above, place an InLine object immediately following the Stimulus object on the TrialProc. Enter the following script into this InLine:
'Create a Canvas object.
Dim cnvs As Canvas
Set cnvs = Display.Canvas
Do While Stimulus.InputMasks.IsPending()
If (Clock.Read - Stimulus.OnsetTime) >= 5000 Then
cnvs.Text 0, 0, "Please Respond Quickly!"
The While loop will repeat continuously until a response from the subject is received. During the loop, the code assesses how much time has passed since the onset of the Stimulus object. If 5 seconds or more have passed, the Canvas object is used to display a message. The experiment will proceed once the subject responds.
For more information view the E-Prime Command Reference for specifics involving E-Basic (https://pstnet.com/ecr).