changing instructions based on counterbalance condition

55 views
Skip to first unread message

melisa akan

unread,
Aug 9, 2015, 7:44:29 PM8/9/15
to E-Prime
Hi all,

This is the first time I have to enter InLine codes in E-prime and it is quite challenging for me. 

I would like to change the instructions in certain trial procedures based on the counterbalance condition. 
Does anyone of you know if there is a way to do this and how? 

Thank you very much! 

Melisa

ecog...@gmail.com

unread,
Aug 10, 2015, 3:59:30 AM8/10/15
to E-Prime
Melisa

Hi. You can just use an If statement. What I normally do is use the subject number (collected by ticking 'subject' on: Edit>Experiment>StartupInfo ) to work out the counterbalancing.

So if you have 4 counterbalancing conditions then use the following in your code:

counter_subj = c.GetAttrib("Subject") Mod 4 'holds the remainder if you divide the subject number by 4.

If counter_subj = 0 Then
<your instructions>
ElseIf counter_subj = 1 Then
<your instructions>
ElseIf counter_subj = 2 Then
<your instructions>
ElseIf counter_subj = 3 Then
<your instructions>
End If


You can also use the 'Select Case' structure instead of the If/End If structure.

Thanks
Rob

melisa akan

unread,
Aug 11, 2015, 2:19:37 PM8/11/15
to E-Prime
Thank you soo much Rob. 

Actually, I would like to write the code based on the counterbalance condition as opposed to subject No.
I want e-prime to select the right instructions when I enter the counterbalance condition name. 
Actually I would also like e-prime to select the right block order depending on counterbalance condition.

I was able to command E-prime to present the right word lists depending on counterbalance condition with the Select Case statement. 
So I tried changing the instructions also with "select cases" but I was not successful. I also tried "if then" statements but it wouldnt work either. 

I will work more on this and then ask a more specific question.
For now, thank you so much for taking the time to answer. It feels good to receive fast answers when you feel lost. :)

Melisa
Reply all
Reply to author
Forward
0 new messages