Millisecond Forums

sequence generator

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

By soobin - 7/30/2017

Good afternoon, I'm soobin.

I have a question.

Do you see the picture? I can't solve the error. What should I do?

My task is 120 test trials (6 categories x 2 formats x 10 repetitions).

I corrected original scripts. I transformed '80' test trials into '120' test trials. I turned '4' categories into '8' categories. 

It is no problem.

I think I should modify below scripts. 


---


/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};
 
if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]
 
/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]
 
/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]
 
/timeout = 0
/recorddata = false
</trial>



---

It would be really appreciated if you help me.

Thank you for your consideration.



By soobin - 7/31/2017

soobin - Monday, July 31, 2017
Good afternoon, I'm soobin.

I have a question.

Do you see the picture? I can't solve the error. What should I do?

My task is 120 test trials (6 categories x 2 formats x 10 repetitions).

I corrected original scripts. I transformed '80' test trials into '120' test trials. I turned '4' categories into '8' categories. 

It is no problem.

I think I should modify below scripts. 


---


/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};
 
if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]
 
/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]
 
/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]
 
/timeout = 0
/recorddata = false
</trial>



---

It would be really appreciated if you help me.

Thank you for your consideration.




P.S. It's Approach Avoidance Task (mouse version)!!
By Dave - 7/31/2017

soobin - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Good afternoon, I'm soobin.

I have a question.

Do you see the picture? I can't solve the error. What should I do?

My task is 120 test trials (6 categories x 2 formats x 10 repetitions).

I corrected original scripts. I transformed '80' test trials into '120' test trials. I turned '4' categories into '8' categories. 

It is no problem.

I think I should modify below scripts. 


---


/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};
 
if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]
 
/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]
 
/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]
 
/timeout = 0
/recorddata = false
</trial>



---

It would be really appreciated if you help me.

Thank you for your consideration.




P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.
By soobin - 7/31/2017

Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Good afternoon, I'm soobin.

I have a question.

Do you see the picture? I can't solve the error. What should I do?

My task is 120 test trials (6 categories x 2 formats x 10 repetitions).

I corrected original scripts. I transformed '80' test trials into '120' test trials. I turned '4' categories into '8' categories. 

It is no problem.

I think I should modify below scripts. 


---


/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};
 
if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]
 
/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]
 
/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]
 
/timeout = 0
/recorddata = false
</trial>



---

It would be really appreciated if you help me.

Thank you for your consideration.




P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.



P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.



P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.

Thank you so much! 

Still I have a problem. 

I added newnumber, runcount. What should I do additionally?




<values>
/count1 = 10
/count2 = 10
/count3 = 10
/count4 = 10
/count5 = 10
/count6 = 10
/count7 = 10
/count8 = 10
/count9 = 10
/count10 = 10
/count11 = 10
/count12 = 10
/runcount_1 = 0
/runcount_2 = 0
/runcount_3 = 0
/runcount_4 = 0
/runcount_5 = 0
/runcount_6 = 0
/runcount_A = 0
/runcount_B = 0
/newnumber = 0
/count_comparecat = 0
/count_compareformat = 0
/sequence = ""
/index = 0
/reset = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text wait>
/items = ("Please wait; we'll be ready shortly")
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 0)
</text>


**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************

<list stimcats>
/ items = (
1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,
8,8,8,8,8,8,8,8,8,8.
9.9.9.9.9.9.9.9.9.9.
10.10.10.10.10.10.10.10.10.10.
11.11.11.11.11.11.11.11.11.11.
12.12.12.12.12.12.12.12.12.12)
/ replace = false
</list>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************

Trial Selectnumber: selects the newnumber and checks whether
all constraints are met
- if all constraints are met: adds new number to sequence
- constraints are not met: checks whether an alternative number is available that could meet constraint
=> if yes: returns current number to list and tries again
=> if no: starts the sequence over


<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
if (values.newnumber == 1)
{values.runcount_1 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_1;
values.count_compareformat = values.runcount_A;
values.count1 -=1}
else if (values.newnumber ==2)
{values.runcount_1 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_1;
values.count_compareformat = values.runcount_B;
values.count2 -=1}
else if (values.newnumber ==3)
{values.runcount_2 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_2;
values.count_compareformat = values.runcount_A;
values.count3 -= 1}
else if (values.newnumber ==4)
{values.runcount_2 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_2;
values.count_compareformat = values.runcount_B;
values.count4 -=1}
else if (values.newnumber ==5)
{values.runcount_3 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_3;
values.count_compareformat = values.runcount_A;
values.count5 -= 1}
else if (values.newnumber ==6)
{values.runcount_3 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_3;
values.count_compareformat = values.runcount_B;
values.count6 -= 1}
else if (values.newnumber == 7)
{values.runcount_4 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_4;
values.count_compareformat = values.runcount_A;
values.count7 -= 1}
else if (values.newnumber == 8)
{values.runcount_4 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_4;
values.count_compareformat = values.runcount_B;
values.count8 -= 1}
else if (values.newnumber == 9)
{values.runcount_5 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_5;
values.count_compareformat = values.runcount_A;
values.count9 -= 1}
else if (values.newnumber == 10)
{values.runcount_5 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_5;
values.count_compareformat = values.runcount_B;
values.count10 -= 1}
else if (values.newnumber == 11)
{values.runcount_6 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_6;
values.count_compareformat = values.runcount_A;
values.count11 -= 1}
else
{values.runcount_6 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_6;
values.count_compareformat = values.runcount_B;
values.count12 -= 1}]

/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};

if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};

if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};

if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]

/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]

/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]

/timeout = 0
/recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
BLOCK
**************************************************************************************************************
**************************************************************************************************************

<block SequenceGenerator>
/ bgstim = (wait)
/ trials = [1 = selectnumber]
/ recorddata = false
</block>

By Dave - 7/31/2017

soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Good afternoon, I'm soobin.

I have a question.

Do you see the picture? I can't solve the error. What should I do?

My task is 120 test trials (6 categories x 2 formats x 10 repetitions).

I corrected original scripts. I transformed '80' test trials into '120' test trials. I turned '4' categories into '8' categories. 

It is no problem.

I think I should modify below scripts. 


---


/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};
 
if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]
 
/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]
 
/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]
 
/timeout = 0
/recorddata = false
</trial>



---

It would be really appreciated if you help me.

Thank you for your consideration.




P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.



P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.



P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.

Thank you so much! 

Still I have a problem. 

I added newnumber, runcount. What should I do additionally?




<values>
/count1 = 10
/count2 = 10
/count3 = 10
/count4 = 10
/count5 = 10
/count6 = 10
/count7 = 10
/count8 = 10
/count9 = 10
/count10 = 10
/count11 = 10
/count12 = 10
/runcount_1 = 0
/runcount_2 = 0
/runcount_3 = 0
/runcount_4 = 0
/runcount_5 = 0
/runcount_6 = 0
/runcount_A = 0
/runcount_B = 0
/newnumber = 0
/count_comparecat = 0
/count_compareformat = 0
/sequence = ""
/index = 0
/reset = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text wait>
/items = ("Please wait; we'll be ready shortly")
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 0)
</text>


**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************

<list stimcats>
/ items = (
1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,
8,8,8,8,8,8,8,8,8,8.
9.9.9.9.9.9.9.9.9.9.
10.10.10.10.10.10.10.10.10.10.
11.11.11.11.11.11.11.11.11.11.
12.12.12.12.12.12.12.12.12.12)
/ replace = false
</list>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************

Trial Selectnumber: selects the newnumber and checks whether
all constraints are met
- if all constraints are met: adds new number to sequence
- constraints are not met: checks whether an alternative number is available that could meet constraint
=> if yes: returns current number to list and tries again
=> if no: starts the sequence over


<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
if (values.newnumber == 1)
{values.runcount_1 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_1;
values.count_compareformat = values.runcount_A;
values.count1 -=1}
else if (values.newnumber ==2)
{values.runcount_1 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_1;
values.count_compareformat = values.runcount_B;
values.count2 -=1}
else if (values.newnumber ==3)
{values.runcount_2 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_2;
values.count_compareformat = values.runcount_A;
values.count3 -= 1}
else if (values.newnumber ==4)
{values.runcount_2 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_2;
values.count_compareformat = values.runcount_B;
values.count4 -=1}
else if (values.newnumber ==5)
{values.runcount_3 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_3;
values.count_compareformat = values.runcount_A;
values.count5 -= 1}
else if (values.newnumber ==6)
{values.runcount_3 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_3;
values.count_compareformat = values.runcount_B;
values.count6 -= 1}
else if (values.newnumber == 7)
{values.runcount_4 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_4;
values.count_compareformat = values.runcount_A;
values.count7 -= 1}
else if (values.newnumber == 8)
{values.runcount_4 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_4;
values.count_compareformat = values.runcount_B;
values.count8 -= 1}
else if (values.newnumber == 9)
{values.runcount_5 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_5;
values.count_compareformat = values.runcount_A;
values.count9 -= 1}
else if (values.newnumber == 10)
{values.runcount_5 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_5;
values.count_compareformat = values.runcount_B;
values.count10 -= 1}
else if (values.newnumber == 11)
{values.runcount_6 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_6;
values.count_compareformat = values.runcount_A;
values.count11 -= 1}
else
{values.runcount_6 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_6;
values.count_compareformat = values.runcount_B;
values.count12 -= 1}]

/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};

if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};

if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};

if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]

/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]

/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]

/timeout = 0
/recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
BLOCK
**************************************************************************************************************
**************************************************************************************************************

<block SequenceGenerator>
/ bgstim = (wait)
/ trials = [1 = selectnumber]
/ recorddata = false
</block>


<list stimcats>
/ items = (
1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,
8,8,8,8,8,8,8,8,8,8.
9.9.9.9.9.9.9.9.9.9.
10.10.10.10.10.10.10.10.10.10.
11.11.11.11.11.11.11.11.11.11.
12.12.12.12.12.12.12.12.12.12)

/ replace = false
</list>

As the error message suggests, you are using the wrong separator here -- you're using a dot (.), whereas you ought to be using a comma (,).

Moreover, you'd have to make extensive changes to the code to get double-digit categories to work (10, 11, etc.). The existing sequence parsing code really doesn't support that. For example, 11 will be interpreted as two times category 1, not one time the category 11.
By soobin - 7/31/2017

Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Good afternoon, I'm soobin.

I have a question.

Do you see the picture? I can't solve the error. What should I do?

My task is 120 test trials (6 categories x 2 formats x 10 repetitions).

I corrected original scripts. I transformed '80' test trials into '120' test trials. I turned '4' categories into '8' categories. 

It is no problem.

I think I should modify below scripts. 


---


/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};
 
if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};
 
if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]
 
/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]
 
/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]
 
/timeout = 0
/recorddata = false
</trial>



---

It would be really appreciated if you help me.

Thank you for your consideration.




P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.



P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.



P.S. It's Approach Avoidance Task (mouse version)!!

The <expt> element in your screenshot references a <block> called "SequenceGenerator" and the error tells you that the script cannot find a block with that name.

Thank you so much! 

Still I have a problem. 

I added newnumber, runcount. What should I do additionally?




<values>
/count1 = 10
/count2 = 10
/count3 = 10
/count4 = 10
/count5 = 10
/count6 = 10
/count7 = 10
/count8 = 10
/count9 = 10
/count10 = 10
/count11 = 10
/count12 = 10
/runcount_1 = 0
/runcount_2 = 0
/runcount_3 = 0
/runcount_4 = 0
/runcount_5 = 0
/runcount_6 = 0
/runcount_A = 0
/runcount_B = 0
/newnumber = 0
/count_comparecat = 0
/count_compareformat = 0
/sequence = ""
/index = 0
/reset = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text wait>
/items = ("Please wait; we'll be ready shortly")
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 0)
</text>


**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************

<list stimcats>
/ items = (
1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,
8,8,8,8,8,8,8,8,8,8.
9.9.9.9.9.9.9.9.9.9.
10.10.10.10.10.10.10.10.10.10.
11.11.11.11.11.11.11.11.11.11.
12.12.12.12.12.12.12.12.12.12)
/ replace = false
</list>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************

Trial Selectnumber: selects the newnumber and checks whether
all constraints are met
- if all constraints are met: adds new number to sequence
- constraints are not met: checks whether an alternative number is available that could meet constraint
=> if yes: returns current number to list and tries again
=> if no: starts the sequence over


<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [
if (values.newnumber == 1)
{values.runcount_1 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_1;
values.count_compareformat = values.runcount_A;
values.count1 -=1}
else if (values.newnumber ==2)
{values.runcount_1 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_1;
values.count_compareformat = values.runcount_B;
values.count2 -=1}
else if (values.newnumber ==3)
{values.runcount_2 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_2;
values.count_compareformat = values.runcount_A;
values.count3 -= 1}
else if (values.newnumber ==4)
{values.runcount_2 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_2;
values.count_compareformat = values.runcount_B;
values.count4 -=1}
else if (values.newnumber ==5)
{values.runcount_3 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_3;
values.count_compareformat = values.runcount_A;
values.count5 -= 1}
else if (values.newnumber ==6)
{values.runcount_3 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_3;
values.count_compareformat = values.runcount_B;
values.count6 -= 1}
else if (values.newnumber == 7)
{values.runcount_4 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_4;
values.count_compareformat = values.runcount_A;
values.count7 -= 1}
else if (values.newnumber == 8)
{values.runcount_4 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_4;
values.count_compareformat = values.runcount_B;
values.count8 -= 1}
else if (values.newnumber == 9)
{values.runcount_5 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_5;
values.count_compareformat = values.runcount_A;
values.count9 -= 1}
else if (values.newnumber == 10)
{values.runcount_5 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_5;
values.count_compareformat = values.runcount_B;
values.count10 -= 1}
else if (values.newnumber == 11)
{values.runcount_6 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_6;
values.count_compareformat = values.runcount_A;
values.count11 -= 1}
else
{values.runcount_6 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_6;
values.count_compareformat = values.runcount_B;
values.count12 -= 1}]

/ontrialend = [
if (values.count_comparecat < 6 && values.count_compareformat < 6)
{
values.sequence = concat(values.sequence, values.newnumber);
values.reset = false;
if (values.newnumber == 1)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 2)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 3)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 4)
{values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 5)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0}
else if (values.newnumber == 6)
{values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0}
else if (values.newnumber == 7)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0}
else if (values.newnumber == 8)
{values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0};
};

if (values.count_comparecat > 3 && values.count_compareformat < 4)
{
if (values.newnumber == 1)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 !=0 || values.count4 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count2 != 0 || values.count5 != 0 || values.count6 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count7 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count2 != 0 || values.count3 != 0 || values.count4 !=0 || values.count5 != 0 || values.count6 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};

if (values.count_comparecat < 4 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
};

if (values.count_comparecat > 3 && values.count_compareformat > 3)
{
if (values.newnumber == 1)
{
if (values.count4 != 0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_A -= 1; values.count1 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 2)
{
if (values.count3 != 0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_B -= 1; values.count2 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 3)
{
if (values.count2 !=0 || values.count6 !=0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_A -= 1; values.count3 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 4)
{
if (values.count1 !=0 || values.count5 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_B -= 1; values.count4 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 5)
{
if (values.count2 !=0 || values.count4 != 0 || values.count8 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_A -= 1; values.count5 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 6)
{
if (values.count1 !=0 || values.count3 != 0 || values.count7 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_B -= 1; values.count6 += 1;
}
else
{
values.reset = true
}
}
else if (values.newnumber == 7)
{
if (values.count2 !=0 || values.count4 != 0 || values.count6 !=0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_A -= 1; values.count7 += 1;
}
else
{
values.reset = true;
}
}
else if (values.newnumber == 8)
{
if (values.count1 !=0 || values.count3 != 0 || values.count5 != 0)
{
values.reset = false; values.index -= 1; list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_B -= 1; values.count8 += 1;
}
else
{
values.reset = true
}
}
}]

/ontrialend = [if (values.reset == true)
{
values.sequence = "";
values.index = 0; values.count_comparecat = 0; values.count_compareformat = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset()
}]

/branch = [if (values.index != values.totaltrialcount) trial.selectnumber]

/timeout = 0
/recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
BLOCK
**************************************************************************************************************
**************************************************************************************************************

<block SequenceGenerator>
/ bgstim = (wait)
/ trials = [1 = selectnumber]
/ recorddata = false
</block>


<list stimcats>
/ items = (
1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,
8,8,8,8,8,8,8,8,8,8.
9.9.9.9.9.9.9.9.9.9.
10.10.10.10.10.10.10.10.10.10.
11.11.11.11.11.11.11.11.11.11.
12.12.12.12.12.12.12.12.12.12)

/ replace = false
</list>

As the error message suggests, you are using the wrong separator here -- you're using a dot (.), whereas you ought to be using a comma (,).

Moreover, you'd have to make extensive changes to the code to get double-digit categories to work (10, 11, etc.). The existing sequence parsing code really doesn't support that. For example, 11 will be interpreted as two times category 1, not one time the category 11.

Oh!! My gosh.. I missed.... Thank you so much!!!! 
I am so grateful for the quick reply.

If don't supported category 11 on AAT... 
What should I do to use '6 categories, 2 formats'?

I mean.. I want to use 6 categories... 
Are Items of <list stimcats>  only 6?

Did I misunderstand?


I want to..

Left, Push, 6 categories(respectively included 10 pictures), 
Left, Pull, 6 categories(respectively included 10 pictures)
Right, Push, 6 categories(respectively included 10 pictures)
Right, Pull, 6 categories(respectively included 10 pictures) 

FormatA is Left, FormatB is Right. I want to use 2 conditions(Push, Pull).
 
So I modified <item targets>(1~120), <list category>(category1~category12), <summarydata>(cat1~cat6).. and so on. 

Is that right? Please help me. 
By Dave - 7/31/2017

soobin - Monday, July 31, 2017

Oh!! My gosh.. I missed.... Thank you so much!!!! 
I am so grateful for the quick reply.

If don't supported category 11 on AAT... 
What should I do to use '6 categories, 2 formats'?

I mean.. I want to use 6 categories... 
Are Items of <list stimcats>  only 6?

Did I misunderstand?


I want to..

Left, Push, 6 categories(respectively included 10 pictures), 
Left, Pull, 6 categories(respectively included 10 pictures)
Right, Push, 6 categories(respectively included 10 pictures)
Right, Pull, 6 categories(respectively included 10 pictures) 

FormatA is Left, FormatB is Right. I want to use 2 conditions(Push, Pull).
 
So I modified <item targets>(1~120), <list category>(category1~category12), <summarydata>(cat1~cat6).. and so on. 

Is that right? Please help me. 

There is no easy fix for using 12 categories. The easiest thing you can do is to forego the constrained sequence (the sequence generator) and simply sample your trials randomly as detailed in the script's comments:

Note:
The trial sequence is generated by helper script 'AAT_SequenceGenerator.iqx'
!!!! The time to generate the appropriate sequence will differ between participants.
Two alternatives are:
1) use pregenerated sequences.
2) run the experiment with simple random sampling (easiest solution)
-> /trials = [1-80 = noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start)]


<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/ trials = [1-80 = AAT_start]
</block>

I.e., in your case, with 12 categories and 10 trials per category, you would do

<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/trials = [1-120= noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start, AAT9_start, AAT10_start, AAT11_start, AAT12_start)]
</block>
By soobin - 7/31/2017

Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017

Oh!! My gosh.. I missed.... Thank you so much!!!! 
I am so grateful for the quick reply.

If don't supported category 11 on AAT... 
What should I do to use '6 categories, 2 formats'?

I mean.. I want to use 6 categories... 
Are Items of <list stimcats>  only 6?

Did I misunderstand?


I want to..

Left, Push, 6 categories(respectively included 10 pictures), 
Left, Pull, 6 categories(respectively included 10 pictures)
Right, Push, 6 categories(respectively included 10 pictures)
Right, Pull, 6 categories(respectively included 10 pictures) 

FormatA is Left, FormatB is Right. I want to use 2 conditions(Push, Pull).
 
So I modified <item targets>(1~120), <list category>(category1~category12), <summarydata>(cat1~cat6).. and so on. 

Is that right? Please help me. 

There is no easy fix for using 12 categories. The easiest thing you can do is to forego the constrained sequence (the sequence generator) and simply sample your trials randomly as detailed in the script's comments:

Note:
The trial sequence is generated by helper script 'AAT_SequenceGenerator.iqx'
!!!! The time to generate the appropriate sequence will differ between participants.
Two alternatives are:
1) use pregenerated sequences.
2) run the experiment with simple random sampling (easiest solution)
-> /trials = [1-80 = noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start)]


<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/ trials = [1-80 = AAT_start]
</block>

I.e., in your case, with 12 categories and 10 trials per category, you would do

<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/trials = [1-120= noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start, AAT9_start, AAT10_start, AAT11_start, AAT12_start)]
</block>

Thank you!

I applied feedback.





Where should I add 'AAT1_start'?

One problem after another......


I have another question.

---
Note:
block.practice_AAT presents 10 practice trials randomly (without replacement) selecting
from format A (left) (N=5) and format B (right) stimuli (N=5)
<block practice_AAT>
/ preinstructions = (intro, practice)
/ trials = [1-20 = noreplace(practicestartA, practicestartB)]
</block>
--

10 practice, Why not '1-10'? 

May I turn '1-20' to '1-10'?

By Dave - 7/31/2017

soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017

Oh!! My gosh.. I missed.... Thank you so much!!!! 
I am so grateful for the quick reply.

If don't supported category 11 on AAT... 
What should I do to use '6 categories, 2 formats'?

I mean.. I want to use 6 categories... 
Are Items of <list stimcats>  only 6?

Did I misunderstand?


I want to..

Left, Push, 6 categories(respectively included 10 pictures), 
Left, Pull, 6 categories(respectively included 10 pictures)
Right, Push, 6 categories(respectively included 10 pictures)
Right, Pull, 6 categories(respectively included 10 pictures) 

FormatA is Left, FormatB is Right. I want to use 2 conditions(Push, Pull).
 
So I modified <item targets>(1~120), <list category>(category1~category12), <summarydata>(cat1~cat6).. and so on. 

Is that right? Please help me. 

There is no easy fix for using 12 categories. The easiest thing you can do is to forego the constrained sequence (the sequence generator) and simply sample your trials randomly as detailed in the script's comments:

Note:
The trial sequence is generated by helper script 'AAT_SequenceGenerator.iqx'
!!!! The time to generate the appropriate sequence will differ between participants.
Two alternatives are:
1) use pregenerated sequences.
2) run the experiment with simple random sampling (easiest solution)
-> /trials = [1-80 = noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start)]


<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/ trials = [1-80 = AAT_start]
</block>

I.e., in your case, with 12 categories and 10 trials per category, you would do

<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/trials = [1-120= noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start, AAT9_start, AAT10_start, AAT11_start, AAT12_start)]
</block>

Thank you!

I applied feedback.





Where should I add 'AAT1_start'?

One problem after another......


I have another question.

---
Note:
block.practice_AAT presents 10 practice trials randomly (without replacement) selecting
from format A (left) (N=5) and format B (right) stimuli (N=5)
<block practice_AAT>
/ preinstructions = (intro, practice)
/ trials = [1-20 = noreplace(practicestartA, practicestartB)]
</block>
--

10 practice, Why not '1-10'? 

May I turn '1-20' to '1-10'?


> Where should I add 'AAT1_start'?

I can't answer that question, because I don't know what changes you made to the script. <trial> elements named AAT1_start, AAT2_start, etc. are in the original script. Ensure that those <trial> elements exist in your modified script, are properly named and double-check the syntax in your <block> element's /trials attribute for typos, misplaced brackets, etc.



Regarding the practice block: The comment is in error. The practice block runs 10 trials _each_, i.e. a total of 20 trials. And yes, you can safely reduce the amount to 10 trials (5 each) if you wish.
By soobin - 7/31/2017

Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017

Oh!! My gosh.. I missed.... Thank you so much!!!! 
I am so grateful for the quick reply.

If don't supported category 11 on AAT... 
What should I do to use '6 categories, 2 formats'?

I mean.. I want to use 6 categories... 
Are Items of <list stimcats>  only 6?

Did I misunderstand?


I want to..

Left, Push, 6 categories(respectively included 10 pictures), 
Left, Pull, 6 categories(respectively included 10 pictures)
Right, Push, 6 categories(respectively included 10 pictures)
Right, Pull, 6 categories(respectively included 10 pictures) 

FormatA is Left, FormatB is Right. I want to use 2 conditions(Push, Pull).
 
So I modified <item targets>(1~120), <list category>(category1~category12), <summarydata>(cat1~cat6).. and so on. 

Is that right? Please help me. 

There is no easy fix for using 12 categories. The easiest thing you can do is to forego the constrained sequence (the sequence generator) and simply sample your trials randomly as detailed in the script's comments:

Note:
The trial sequence is generated by helper script 'AAT_SequenceGenerator.iqx'
!!!! The time to generate the appropriate sequence will differ between participants.
Two alternatives are:
1) use pregenerated sequences.
2) run the experiment with simple random sampling (easiest solution)
-> /trials = [1-80 = noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start)]


<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/ trials = [1-80 = AAT_start]
</block>

I.e., in your case, with 12 categories and 10 trials per category, you would do

<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/trials = [1-120= noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start, AAT9_start, AAT10_start, AAT11_start, AAT12_start)]
</block>

Thank you!

I applied feedback.





Where should I add 'AAT1_start'?

One problem after another......


I have another question.

---
Note:
block.practice_AAT presents 10 practice trials randomly (without replacement) selecting
from format A (left) (N=5) and format B (right) stimuli (N=5)
<block practice_AAT>
/ preinstructions = (intro, practice)
/ trials = [1-20 = noreplace(practicestartA, practicestartB)]
</block>
--

10 practice, Why not '1-10'? 

May I turn '1-20' to '1-10'?


> Where should I add 'AAT1_start'?

I can't answer that question, because I don't know what changes you made to the script. <trial> elements named AAT1_start, AAT2_start, etc. are in the original script. Ensure that those <trial> elements exist in your modified script, are properly named and double-check the syntax in your <block> element's /trials attribute for typos, misplaced brackets, etc.



Regarding the practice block: The comment is in error. The practice block runs 10 trials _each_, i.e. a total of 20 trials. And yes, you can safely reduce the amount to 10 trials (5 each) if you wish.

My trial range is so wide... 

How do I put them in ascending order?



Thank you so much!
By Dave - 8/1/2017

soobin - Tuesday, August 1, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017
Dave - Monday, July 31, 2017
soobin - Monday, July 31, 2017

Oh!! My gosh.. I missed.... Thank you so much!!!! 
I am so grateful for the quick reply.

If don't supported category 11 on AAT... 
What should I do to use '6 categories, 2 formats'?

I mean.. I want to use 6 categories... 
Are Items of <list stimcats>  only 6?

Did I misunderstand?


I want to..

Left, Push, 6 categories(respectively included 10 pictures), 
Left, Pull, 6 categories(respectively included 10 pictures)
Right, Push, 6 categories(respectively included 10 pictures)
Right, Pull, 6 categories(respectively included 10 pictures) 

FormatA is Left, FormatB is Right. I want to use 2 conditions(Push, Pull).
 
So I modified <item targets>(1~120), <list category>(category1~category12), <summarydata>(cat1~cat6).. and so on. 

Is that right? Please help me. 

There is no easy fix for using 12 categories. The easiest thing you can do is to forego the constrained sequence (the sequence generator) and simply sample your trials randomly as detailed in the script's comments:

Note:
The trial sequence is generated by helper script 'AAT_SequenceGenerator.iqx'
!!!! The time to generate the appropriate sequence will differ between participants.
Two alternatives are:
1) use pregenerated sequences.
2) run the experiment with simple random sampling (easiest solution)
-> /trials = [1-80 = noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start)]


<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/ trials = [1-80 = AAT_start]
</block>

I.e., in your case, with 12 categories and 10 trials per category, you would do

<block AAT>
/ preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/trials = [1-120= noreplace(AAT1_start, AAT2_start, AAT3_start, AAT4_start, AAT5_start, AAT6_start, AAT7_start, AAT8_start, AAT9_start, AAT10_start, AAT11_start, AAT12_start)]
</block>

Thank you!

I applied feedback.





Where should I add 'AAT1_start'?

One problem after another......


I have another question.

---
Note:
block.practice_AAT presents 10 practice trials randomly (without replacement) selecting
from format A (left) (N=5) and format B (right) stimuli (N=5)
<block practice_AAT>
/ preinstructions = (intro, practice)
/ trials = [1-20 = noreplace(practicestartA, practicestartB)]
</block>
--

10 practice, Why not '1-10'? 

May I turn '1-20' to '1-10'?


> Where should I add 'AAT1_start'?

I can't answer that question, because I don't know what changes you made to the script. <trial> elements named AAT1_start, AAT2_start, etc. are in the original script. Ensure that those <trial> elements exist in your modified script, are properly named and double-check the syntax in your <block> element's /trials attribute for typos, misplaced brackets, etc.



Regarding the practice block: The comment is in error. The practice block runs 10 trials _each_, i.e. a total of 20 trials. And yes, you can safely reduce the amount to 10 trials (5 each) if you wish.

My trial range is so wide... 

How do I put them in ascending order?



Thank you so much!

> My trial range is so wide... 
> How do I put them in ascending order?

I don't understand what that means. Please re-phrase & clarify. What is, however, clear from your screenshot is that you re-named those <trial> elements. You introduced an additional underscore. Adjust the syntax in your <block>'s /trials attribute accordingly.