|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/10/2008 10:52:34 AM
Posts: 19,
Visits: 69
|
|
| Hi everyone, I am designing an experiment where a Prime word is presented in the middle of the screen, and after a short duration a Target word is flashed on the screen either in the left visual field, right visual field or bilaterally. The subject has to decide whether the Target word is the same as the Prime word. The words are drawn from a nested list such that the Prime and Target 'pairs' of words are always random. I am using a text object to display the Prime, and a slide object to display the Target in the three different visual fields. The problem I am having is with the subject's responses. Given that the Prime and Target words are generated randomly, what script can I use to tell the programme that if the Target word is the same as the Prime word, the correct answer will be the number "1" on the keyboard, while if the words are different, the correct answer will be the number "2"? Thanks - I hope this makes sense!
|
|
|
|
|
Forum MVP
      
Group: Administrators
Last Login: Today @ 9:26:59 AM
Posts: 576,
Visits: 1,254
|
|
| In short, if you know the crossing, then you can do so via your List object and specify the correct answer there and put [CorrectAnswer] attribute value into the correct field in Duration/Input property page. If you are doing somehting dynamically, you can still do the [CorrectAnswer] attribute, but use script to determine if the values are the same. Take a look at the Nesting samples for more info first. -Brandon
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/10/2008 10:52:34 AM
Posts: 19,
Visits: 69
|
|
| Brandon, Thanks very much for the reply. I think I have to use script to determine if the values are the same, because the Prime and Target words are drawn randomly from the word list, so they are completely independent of one another. As a complete novice with E Prime, I thought I would try some code to test whether I can get E-prime to detect if the Prime and Target words are the same, and I came up with this: If c.GetAttrib ("Prime") = c.GetAttrib ("Target") Then MsgBox "same!" Else MsgBox "different!" End if This code seemed to work fine, and I now have the message 'same!' appear when the words match, and 'different' when the words don't match. My problem now, is how can I get E-Prime to understand that when the Prime = Target, the correct answer = 1, and if not the correct answer = 2? (I don't want my MsgBox to stay, that was merely a test! ). Thanks again!
|
|
|
|
|
Forum MVP
      
Group: Administrators
Last Login: Today @ 9:26:59 AM
Posts: 576,
Visits: 1,254
|
|
If c.GetAttrib ("Prime") = c.GetAttrib ("Target") Then c.SetAttrib "CorrectAnswer", "1" Else c.SetAttrib "CorrectAnswer", "2" End IfThen put [CorrectAnswer] into your "correct" field in the E-Studio GUI. -Brandon
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/10/2008 10:52:34 AM
Posts: 19,
Visits: 69
|
|
Brandon, you are a champion!  It seems to be working perfectly now, thankyou!!
|
|
|
|