Terminate list at set time, even if current sample no completed.

Paul Groot pfc.groot at gmail.com
Mon Nov 11 08:15:40 UTC 2013


Hi Kate,

Because the 'exit list' condition is tested at the end of each trial,
eprime doesn't handle timeout values that occur during the trial itself.
Even if the trial only contains a single object. The solution is to limit
the duration of the individual object(s).

This is what I would do (assuming that the TextDisplay object is
called Stimulus):

1) Create a global variable in the user section of the script window:

Dim FirstOnset As Long ' onsettime of first stimulus

2) Insert an inline script at the start of the trial procedure that
calculates the total time left, and use this value to change the stimulus
duration from infinite to the leftover time:

' FirstOnset is a global variable which is declared in the user section of
the script window
If FirstOnset=0 Then
FirstOnset = Stimulus.TargetOnsetTime
End If

Dim timeLeft As Long
timeLeft = 120000 - Stimulus.TargetOnsetTime
If timeLeft>0 Then
Stimulus.Duration = timeLeft
Else
Stimulus.Duration = 0
End If

Things can get a bit more complex if the trial contains several objects,
though.

Also also see the attached example.

Best
Paul



On 11 November 2013 03:39, Kate Cox <katehmcox at gmail.com> wrote:

> Hi I'm very new to eprime and have no script background so please be
> gentle :).
>
> *What I'm trying to do:* present participants with a series of
> mathematical equations which they must answer, using the keyboard. They
> must answer as many equations as they can in 2 minutes. After 2 minutes the
> task will terminate (and go on to the next task) even if they are part way
> through giving an answer. The outcomes i'm measuring are accuracy, RT of
> correct responses and number of correct responses in the 2 minute time
> window.
>
> *What is working and how I have it set up*: I have 300 potential
> equations in a list called "TrialList", which are presented on a
> TextDisplay. This works perfectly.
> Answers typed on the keyboard are echoed on the screen and logged. When an
> answer is complete the participant presses ENTER and the the next equation
> in my list is shown. This works perfectly.
> In the TextDisplay properties, under the Duration/Input tab I have
> duration as infinite, timing mode as Event, the keyboard as the only
> device, allowable responses is any, time limit is same as duration and End
> action is terminate.
> In the list properties, under the Reset/Exit tab I have set Exit List to
> "After 120 seconds"
>
> *The problem: *I can't get the task to terminate at exactly 2 minutes. At
> the moment it appears to stop when the trial that is running at 2 minute
> mark is terminated (ie the participant presses enter).  For example if a
> participant starts an equation at 1:55 then the task won't stop at 2:00 it
> will wait until they submit their answer and that trial is terminated. As
> some of my participants aren't particularly fast to provide their responses
> this may end up being closer to 3 minutes than 2.
>
> I'm pretty useless with script but I've found the bit that refers to the
> termination settings and it looks like this:
>
> Set TrialList.TerminateCondition = TimedMSecs(120000)
> Set TrialList.ResetCondition = Samples(300)
> TrialList.Reset
>
> I've tried searching this group and the Eprime guide for the answers but
> can't find how to fix it. I know some people have mentioned some script
> that terminates at a particular clock setting  but my script seems to look
> different to theirs so I'm not sure how to implement it. Also this maths
> task is part of a larger battery of tasks so how a participant performs on
> earlier tasks will determine where the running clock is when they get up to
> the maths problems (ie a participant who is faster at earlier tasks may
> start the math task at the 5 minute mark and someone who is slower might
> start it at the 7 minute mark, so the running clock will be different 2
> minutes into the math task).
>
> I hope all this makes sense. Any help would be hugely appreciated.
>
> thank you in advance
> Kate
>
> --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to e-prime+unsubscribe at googlegroups.com.
> To post to this group, send email to e-prime at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/e-prime/45042996-2ab3-49e6-a906-558b31be27f4%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/CAKAdR-snAMpVGELB-SZ15HA6YQ0rG5z6vqniHqQWPC6uO%3DXEfw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20131111/4c7c93fe/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SetTaskDuration.es2
Type: application/octet-stream
Size: 96324 bytes
Desc: not available
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20131111/4c7c93fe/attachment.obj>


More information about the Eprime mailing list