Millisecond Forums

stroop windowsresponse

https://forums.millisecond.com/Topic20915.aspx

By moon3 - 3/1/2017

Dear all,

I have been trying to change the original script from the Stroop task in order to just have into account the latencies between 200 and 5000 ms, but it's not working:

/ontrialend =[
       list.responses.insertitem(trial.redcongruent.correct,1);
       list.responses_congruent.insertitem(trial.redcongruent.correct,1);
       if (trial.redcongruent.correct)
       {
       if (trial.redcongruent.latency > 200 || trial.redcongruent.latency <5000)
       {
       list.latencies.insertitem (trial.redcongruent.latency,1);
       list.latencies_congruent.inseritem (trial.redcongruent.latency,1);
       }
       else
      {
      list.latencies_out.inseritem(trial.redcongruent.latency,1);
      values.discard +=1;
      }
}
]
Thank you in advance!!!












By Dave - 3/1/2017

moon3 - Wednesday, March 1, 2017
Dear all,

I have been trying to change the original script from the Stroop task in order to just have into account the latencies between 200 and 5000 ms, but it's not working:

/ontrialend =[
       list.responses.insertitem(trial.redcongruent.correct,1);
       list.responses_congruent.insertitem(trial.redcongruent.correct,1);
       if (trial.redcongruent.correct)
       {
       if (trial.redcongruent.latency > 200 || trial.redcongruent.latency <5000)
       {
       list.latencies.insertitem (trial.redcongruent.latency,1);
       list.latencies_congruent.inseritem (trial.redcongruent.latency,1);
       }
       else
      {
      list.latencies_out.inseritem(trial.redcongruent.latency,1);
      values.discard +=1;
      }
}
]
Thank you in advance!!!













if (trial.redcongruent.latency > 200 || trial.redcongruent.latency <5000)

You don't want a logical OR ("||") here; you need a logical AND ("&&")

if (trial.redcongruent.latency > 200 && trial.redcongruent.latency <5000)