ExitValueSamples: get it in an Inline?

David Perlman dperlman at wisc.edu
Fri Oct 23 20:25:05 UTC 2009


Is there a way to get the "Exit List After # Samples" value from a  
list object and use it in an Inline script?  Looking at the .es file  
in a text editor (I'm using Eprime 1.1) I see the value is stored as  
"ExitValueSamples" but I haven't found anything about that in the  
documentation anywhere, or through Google.

The reason I am trying to do this is that I have script to run an  
experiment in the fMRI scanner.  The experiment is broken into 8 scan  
runs to allow the subject resting periods.  If something goes wrong I  
need to be able to start up the script on a specified run number.   
Right now I have it prompt for a startup value StartRunNum and then I  
have a script at the beginning which uses a For loop to step through  
the right number of GetNextAttrib() methods, which has the effect of  
advancing the list by the right number.  But there are sub-lists  
within each run, which also need to be advanced.  I am piloting this  
right now, so I may be changing the numbers of samples of the various  
sub-lists, and if I do it this way it gets to be a complicated set of  
nested For loops with values that have to stay synchronized with  
changes in the Exit List After Samples in a complicated way.  So I'd  
like to be able to change the Exit After value in my lists without  
needing to update the skip-ahead script.

If anyone has a better way of skipping ahead to a specified run  
number, I'd be open to alternatives, too.

If it helps, here is the script I have now, in an Inline right at the  
very beginning:

Dim StartRunNum as Integer
StartRunNum=CInt(c.GetAttrib("StartRunNum"))

Dim i,j,k as Integer
Dim dstr as String

For i = 1 To StartRunNum-1
	dstr = RunList.GetNextAttrib("Weight")
	For j = 1 to 4
		dstr = TrialList.GetNextAttrib("Weight")
		For k = 1 to 16
			dstr = ProbeList.GetNextAttrib("Weight")
		Next k
	Next j
Next i

This makes the assumption that there are 4 samples of TrialList per  
Run and 4 samples of ProbeList per Trial.  What I'd like to have is  
something like this:

For i = 1 To StartRunNum-1
	dstr = RunList.GetNextAttrib("Weight")
	For j = 1 to TrialList.GetAttr("ExitValueSamples")
		dstr = TrialList.GetNextAttrib("Weight")
		For k = 1 to TrialList.GetAttr("ExitValueSamples") *  
ProbeList.GetAttr("ExitValueSamples")
			dstr = ProbeList.GetNextAttrib("Weight")
		Next k
	Next j
Next i

...which would automatically advance by the right number when I  
changed the Exit List After Samples setting in TrialList or ProbeList.


Thanks very much for any help!

--
-dave----------------------------------------------------------------
"Pseudo-colored pictures of a person's brain lighting up are
undoubtedly more persuasive than a pattern of squiggles produced by a
polygraph.  That could be a big problem if the goal is to get to the
truth."  -Dr. Steven Hyman, Harvard




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list