setting procedure and weight attributes
Paul Gr
pauls_postbus at hotmail.com
Sun Aug 20 13:09:08 UTC 2006
hi Katherine,
Because EPrime prepares List objects once before executing, it is not
possible to change weight and procedure configurations on the fly. There are
special functions which you can call to change those settings
(List.SetWeight, List.SetProc, ...), but they should be called before the
list is reset and activated. So, if you would like to change the trial order
and run count (weight) while the list is already running, then you will have
to implement some kind of workaround. One thing you could do is the
following: Just create a List object for playing your trials (i.e.
TrialList) and define one level with and a procedure called TrialProc. Then
place a new List object (called CaseList for example) on the timeline of
this TrialProc. This sub list will be used to select and play one of the
possible trial types you are going to implement each time the TrialProc
runs. Then add a new level to CaseList for each trial type and implement the
procedures. In the attached example Ive created only two types: Proc1 and
Proc2. Now you will have to add some script to select one of the levels of
the CaseList. To do this you should insert an inline script icon before in
TrialProc before CaseList. The following code is an example for randomly
selecting one of the two levels in the example script:
Dim NextCase as integer
NextCase = Random(1,2)
Set CaseList.Order = OffsetOrder(NextCase)
Set CaseList.TerminateCondition = Samples(1)
CaseList.Reset
The construction with CaseList is very similar to the Case-Select
construction of the Basic language (or the switch construction of C/C++):
only one specific item of a given list will be selected at runtime for
execution.
You can use the Exit list properties of TrialList to specify the
termination condition as usual. However, if you also would like to have more
control of the termination of the list, then you can use the Terminate
function of TrialList to exit the list on the fly. For example, the
following script will terminate the list as soon as trial type 1 is played 3
times:
' as an example, this experiment terminates as soon as trial type 1 is
executed 3 times
if NextCase=1 then
' TrialType1Count is a global variable (see User Section)
TrialType1Count = TrialType1Count + 1
if TrialType1Count=3 then
TrialList.Terminate ' stop when this trial has finished
end if
end if
To prevent early termination, I've also set the exit list property (cycle
count) to 1000.
Ive attached a simple example script. (This will probably be filtered out
on the eprime list)
Hope this helps,
Paul Groot
Vrije Universiteit Amsterdam
>From: "Katherine Sledge Moore" <mooreks at umich.edu>
>To: <eprime at mail.talkbank.org>
>Subject: setting procedure and weight attributes
>Date: Fri, 18 Aug 2006 09:52:29 -0400
>
>Is it possible to set the values of the procedure or weight attributes
>using
>in line code, the way you can for other variables?
>
>The problem I see is that inline code can only be used to modify the
>attributes of the current level, not the level below, but it's
>self-referential to modify the weight of the procedure you're currently
>operating on (or to set it to a different procedure altogether!)
>
>So, is there an exception built into Eprime wherein one can set these
>values
>using code at a level above? For my issue I am most interested in the
>weight
>setting, but I'm curious about the procedure setting as well.
>
>Katherine Sledge Moore
>Department of Psychology
>PhD Student, Cognition and Perception
>http://www.umich.edu/~mooreks
>
>
>
More information about the Eprime
mailing list