A couple of questions -reading the instructions really helps
Tony Zuccolotto
anthony.zuccolotto at pstnet.com
Wed Jun 15 13:58:25 UTC 2005
Hi Eddie,
Note that using List.TerminateCondition = TimedSeconds(30) will
basically tell the list to not start another trial after 30 seconds.
However, it has no control over what happens once a trial has started,
i.e. the list will only check this condition at the beginning of a trial
and once started would not suddenly terminate a trial midway through if
the 30 seconds happened to expire at that point.
For many paradigms this is acceptable and you don't want the current
trial to terminate until complete, for others that need a more precise
termination you will probably have to insert script to periodically call
Clock.Read to get the millisecond time count and then abort the current
trial once a time limit is passed, e.g. in pseudo code...
Dim g_nEndTime As Long ' global variable to hold end time of current
timed sequence
...
' In an inline at the appropriate place in the experiment before the
sequence begins
g_nEndTime = Clock.Read + 30000 ' end time = current time + 30
seconds
...
' In an inline within the trial
If Clock.Read >= g_nEndTime Then
' tells the list not to start another trial
MyList.Terminate
' log some indication in the data file that this trial was
incomplete
c.SetAttrib "Status", "timeout"
c.Log ' log the current
(partial) trial
Exit Sub ' Exit the current procedure immediately
End If
Note, the above script assumes that MyList is the List object that is
currently running and thus the Inline could only be used within
Procedures called from the MyList. You can make this script more
generic and portable by determining at runtime the name of the currently
running list by examining the "Running" attribute which indicates the
name of the currently running list and then looking up the List object
and terminating it.
' In an inline within the trial
If Clock.Read >= g_nEndTime Then
' Get a reference to the currently running list object
Dim objList As FactorSpace
Set objList = GetFactorSpaceByName(c.GetAttrib("Running"))
' tell the currently running list to terminate
objList.Terminate
' log some indication in the data file that this trial was
incomplete
c.SetAttrib "Status", "timeout"
c.Log ' log the current
(partial) trial
Exit Sub ' Exit the current procedure immediately
End If
Hope that helps,
Tony
Anthony P. Zuccolotto
President and Chief Executive Officer
Psychology Software Tools, Inc.
2050 Ardmore Boulevard
Suite 200
Pittsburgh, PA 15221-4610
Phone 412-271-5040
FAX 412-271-7077
Email anthony.zuccolotto at pstnet.com
Internet http://www.pstnet.com
> -----Original Message-----
> From: eprime at mail.talkbank.org [mailto:eprime at mail.talkbank.org] On
Behalf
> Of Eddie Dubourg
> Sent: Wednesday, June 15, 2005 6:45 AM
> To: 'E-Prime'
> Subject: RE: A couple of questions -reading the instructions really
helps
>
> By actually looking seriously at the help files, I've answered the
first
> question - it's directly answered in the help files and uses :-
> Set list.TerminateCondition = TimedSeconds(30)
> list.Reset
>
> Well, that's the first egg on my face today......
>
> E
>
> U> -----Original Message-----
> U> From: eprime at mail.talkbank.org
> U> [mailto:eprime at mail.talkbank.org] On Behalf Of Eddie Dubourg
> U> Sent: 15 June 2005 09:51
> U> To: 'E-Prime'
> U> Subject: A couple of questions.
> U>
> U> I've two, hopefully minor queries.
> U>
> U> The first - is there a method to allow a procedure to
> U> execute for a set amount of time? We have a hemispheric
> U> observation task which has been scripted, but we need to
> U> have a distractor task interleaved which will take the form
> U> of 30 seconds of simple maths problems - I've sorted out all
> U> bits, but can't work out how to restrict it to 30 seconds.
> U>
> U> Second, in another script, I have another observation task,
> U> but the target words have to be preceded by two priming
> U> words randomly selected from a list of about 10 words.
> U> There will be 20 target words, so I have 20 lists of 10
> U> words, and the lists will occur in a random order, and I
> U> can't work out how to associate the target words with a
> U> particular list of primes since the primes will occur randomly.
> U>
> U> I hope these confused witterings make some form of sense.
> U>
> U> Thanks in advance,
> U>
> U> Eddie Dubourg
> U>
> U>
>
More information about the Eprime
mailing list