Creating Variables in Eprime

1,970 views
Skip to first unread message

David McCoy

unread,
Oct 27, 2009, 9:55:21 AM10/27/09
to E-Prime
Hi,

I am programming an experiment that presents a word to the left or
right during an encoding phase. After about 40 or so of these words
being presented there is a retrieval phase where the subject sees
either the same words or new words presented in the center of the
screen. A dot appears on the left or right of the word and the subject
responds to it.

-I need to find a way to create a variable during the encoding phase
that will 'memorize' if a certain word is presented to the left or
right so that during the retrieval phase it can call it. For example,
when I analyze the data I need to filter the setting in the Edat file
so that I can look at the RT time for a dot that appears congruently
(dot on same side as encoding word), incongruently (dot on opposite
side as encoding word) and neutral.)

Is there a way of making a global variable that can input which side a
word is presented? So that words encoded on the left can be poured
into an attribute, encoding words on the right into another and from
there I can call those attributes in the retrieval phase?

Thanks.

David McFarlane

unread,
Oct 27, 2009, 11:08:56 AM10/27/09
to e-p...@googlegroups.com
Just so you know, PST Web Support likes to take these sorts of
questions at http://support.pstnet.com/e%2Dprime/support/login.asp
. They promise response times of 24-48 hours to all requests, so you
might do better there than here. And if you feel charitable you may
then post the answer back here for the sake of others.

Michiel Spape

unread,
Oct 27, 2009, 11:54:21 AM10/27/09
to e-p...@googlegroups.com
Hi David & David,
I agree, DavicMcF, that some people seem to write to this list as if we're actually PST support*, just throwing the questions with little regards to introductions and so on. Some people might like to know we're not paid by PST. Yet, I do not believe this question, like you responded to the last one, is beyond you (concerning exitvaluesamples).

Anyway, David McC,
You might try a bit more reading and working on tutorials, such as the amazing E-Primer (http://www.cognitology.eu/pubs/AnE-Primer2009.pdf) offers, as your language seems to suggest you're not quite aware of how best to structure your experiment in E-Prime. It is, and I don't mean this as patronising as it may sound, a bit like someone going to the MSOffice support forum and asking "I want to write a thriller novel, how do I insert a character into my storyline?" (perhaps hoping for a Sherlock Holmes wizard).
So yes, you can do with E-Prime what you want, but A: I'm not exactly clear what you want (you mean, a normal variable, attribute, or type?) and B: it'll probably be easier if you work without lots of script.
A1: (Var) Press Alt+5 twice to bring up the user script (user tab), and bring in your global variables! Such as "Dim WordOneWasPresented as string", writing in a little inline in your experiment that assigns "left" and "right" to WordOneWasPresented - WordOneWasPresented="left" for example. You could do it like that.
A2. (Attribute) Just add attributes to the first list - all sublists should have access to it.
A3. (Type) You can create new objects in E-Prime, from the documentation:@
Sub Main()
Dim a As Object
Dim b As Object
Set a = CreateObject("phantom.application)
Set b = a
Set a = Nothing
End Sub
How cool is that? But if you mean something like this, I'm with DavidMcF - try to official support. If you want this heavy programming, I'd suggest C#

B1. Well, you could just store your words in, say, a 2-dimensional Array,
Dim TheWords(3,2) as string
TheWords(1,1) = "oneword"
TheWords(2,1) = "twoword"
TheWords(3,1) = "threeword"
And, upon presentation, you just make the list remember where you presented it. Let's say you have an attribute "WordLoc" that encodes where the current word is presented:
If "WordLoc" = "left" then TheWords(1,2) = "left" else TheWords(1,2) = "right"

Right, something like that? Forgive me if I have been giving sloppy instructions, rather than a good step-by-step guide, but I don't know exactly what you want and b, I have to do some work myself sometimes.
Best,
Mich

* note, upon re-reading this, it sounds a bit as if I accuse DmcF of being fed up with ill-defined and introduction-less questions - I do not mean that.

Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

Reply all
Reply to author
Forward
0 new messages