Yet Another Question: populating lists from files

Todd Thompson twthompson at gmail.com
Fri Jan 7 22:17:19 UTC 2005


Thanks for the help! I've gotten my script to work, for now.

Ultimately, I had two problems:
1) I was missing the List.Reset call.
2) My reset/sampling method on the list was set to "all". I assumed
the necessary number of samples would be recalcuated after the list
was reset. This does not seem to happen. To work around this, I had to
either have the correct number of "dummy rows" in the list before the
file was processed, or have an inline instruction to update the
List.ResetCondition after the file is loaded. The latter method is
probably more robust.

In any case, thanks again, and I hope this saves someone else some time!

Todd


On Fri, 07 Jan 2005 17:47:40 +0100, Paul Gr <pauls_postbus at hotmail.com> wrote:
> Hi Todd,
>
> here is an example code snippet, which fills a list object from an external
> file. You should set the filename variable (strFilename) before this code
> and insert it as an inline object at the beginning of your experiment.
>
> ' load stimulus definitions, or use embedded defaults
> If Len(strStimuliDefinitionFile)>0 then
>         Debug.Print "Loading stimuli definitions file: " & strStimuliDefinitionFile
>         lstStimuli.LoadMethod = ebLoadMethodFile
>         lstStimuli.Filename = strStimuliDefinitionFile
>         lstStimuli.Load
>         lstStimuli.Reset
> End If
>
> Note that EPrime is very sensitive about the format and contents of the
> external file. The first line should contain the attribute names. Including
> Weight, Nested and Procedure. All names and values should be separated by a
> tab character, not spaces. Also, prevent extra tabs and spaces at the end of
> the lines, and empty lines at the end of the file.
>
> cheers,
> Paul Groot. Vrije Universiteit Amsterdam
>
> >From: Todd Thompson <twthompson at gmail.com>
> >Reply-To: toddt at alumni.rice.edu
> >To: "eprime at mail.talkbank.org" <eprime at mail.talkbank.org>
> >Subject: Yet Another Question: populating lists from files
> >Date: Thu, 6 Jan 2005 16:17:57 -0800
> >
> >Sorry to deluge the mailing list, but I have one more hopefully simple
> >ePrime question:
> >
> >I want to run the same experiment six times, changing the stimuli with
> >each run. I'd like to populate my lists from one of the six input
> >files dynamically, depending on the run number.
> >
> >Is this possible? Here are the things I tried that didn't work:
> >1) I set the list load method to File, then put a variable "[var]" in
> >the list filename field -- this gave an error message saying
> >"reference to attribute not permitted"
> >2) I left the list load method as embedded in the GUI, then created an
> >inline block of code that looked like this:
> >PassiveTrials.loadmethod = ebLoadMethodFile
> >PassiveTrials.filename = "PassiveBlock1.txt"
> >PassiveTrials.load
> >This ran my embedded list and ignored my attempts to load a new list.
> >
> >I know I can solve this problem other ways (via nested lists, for
> >example), but I like being able to generate/maintain my stimuli
> >externally, if I'm working on a computer without ePrime installed.
> >
> >Sorry if this is an overly simple question. I'm finding the ePrime
> >help files and documentation somewhat inadequate...
> >
> >Thanks for any help,
> >Todd
> >
> >----
> >Todd Thompson
> >Helen Wills Neuroscience Institute
> >University of California, Berkeley
> >
>
> _________________________________________________________________
> MSN Webmessenger: altijd en overal beschikbaar http://webmessenger.msn.com/
>
>



More information about the Eprime mailing list