integrating list to avoid duplicates


Author
Message
ai293
ai293
Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)
Group: Forum Members
Posts: 7, Visits: 68
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
ai293 - 11/24/2024
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



The first thing you need to do is check each name provided by the participant against your bank of 20 filler names. If it's a match, i.e. the name is in the bank, you need to remove that name from the bank. Out of the remaining names in the filler bank, pick 10 at random.

Whether you use lists for this or not, doesn't really matter. You can use lists, but you can also do without.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Dave - 11/25/2024
ai293 - 11/24/2024
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



The first thing you need to do is check each name provided by the participant against your bank of 20 filler names. If it's a match, i.e. the name is in the bank, you need to remove that name from the bank. Out of the remaining names in the filler bank, pick 10 at random.

Whether you use lists for this or not, doesn't really matter. You can use lists, but you can also do without.

One way to go about this:
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.pName1, values.pName2, values.pName3)
</list>

<values>
/ pName1 = ""
/ pName2 = ""
/ pName3 = ""
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
</values>

<surveypage enterNames>
/ ontrialend = [
    // some input sanitization
    values.pName1 = capitalize(tolower(textbox.participantName1.response));
    values.pName2 = capitalize(tolower(textbox.participantName2.response));
    values.pName3 = capitalize(tolower(textbox.participantName3.response));
    // now check each entered name against the filler names
    // if there's a match, remove the name from the filler list
    var i = 0;
    while (i < list.participantNames.itemcount) {
        i += 1;
        var currentName = list.participantNames.item(i);
        var onFillerList = list.fillerNames.indexof(currentName);
        if (onFillerList != -1) { // if name matches one in the filler list
            list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
        };
    };
    // now pick filler names from the remaining
    values.fName1 = list.fillerNames.nextvalue;
    values.fName2 = list.fillerNames.nextvalue;
    values.fName3 = list.fillerNames.nextvalue;
]
/ caption = "Names in the filler bank:
<%list.fillerNames.item(1)%>, <%list.fillerNames.item(2)%>, <%list.fillerNames.item(3)%>,
<%list.fillerNames.item(4)%>, <%list.fillerNames.item(5)%>, <%list.fillerNames.item(6)%>"
/ questions = [1=participantName1; 2=participantName2; 3=participantName3]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<textbox participantName1>
/ caption = "1st Name:"
/ mask = alphabetic
</textbox>

<textbox participantName2>
/ caption = "2nd Name:"
/ mask = alphabetic
</textbox>

<textbox participantName3>
/ caption = "3rd Name:"
/ mask = alphabetic
</textbox>

<block namesBlock>
/ postinstructions = (result)
/ trials = [1=enterNames]
</block>

<page result>
^^Names entered by participant:
<%values.pName1%>, <%values.pName2%>, <%values.pName3%>
^^Filler names selected:
<%values.fName1%>, <%values.fName2%>, <%values.fName3%>
</page>

ai293
ai293
Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)
Group: Forum Members
Posts: 7, Visits: 68
Dave - 11/25/2024
Dave - 11/25/2024
ai293 - 11/24/2024
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



The first thing you need to do is check each name provided by the participant against your bank of 20 filler names. If it's a match, i.e. the name is in the bank, you need to remove that name from the bank. Out of the remaining names in the filler bank, pick 10 at random.

Whether you use lists for this or not, doesn't really matter. You can use lists, but you can also do without.

One way to go about this:
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.pName1, values.pName2, values.pName3)
</list>

<values>
/ pName1 = ""
/ pName2 = ""
/ pName3 = ""
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
</values>

<surveypage enterNames>
/ ontrialend = [
    // some input sanitization
    values.pName1 = capitalize(tolower(textbox.participantName1.response));
    values.pName2 = capitalize(tolower(textbox.participantName2.response));
    values.pName3 = capitalize(tolower(textbox.participantName3.response));
    // now check each entered name against the filler names
    // if there's a match, remove the name from the filler list
    var i = 0;
    while (i < list.participantNames.itemcount) {
        i += 1;
        var currentName = list.participantNames.item(i);
        var onFillerList = list.fillerNames.indexof(currentName);
        if (onFillerList != -1) { // if name matches one in the filler list
            list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
        };
    };
    // now pick filler names from the remaining
    values.fName1 = list.fillerNames.nextvalue;
    values.fName2 = list.fillerNames.nextvalue;
    values.fName3 = list.fillerNames.nextvalue;
]
/ caption = "Names in the filler bank:
<%list.fillerNames.item(1)%>, <%list.fillerNames.item(2)%>, <%list.fillerNames.item(3)%>,
<%list.fillerNames.item(4)%>, <%list.fillerNames.item(5)%>, <%list.fillerNames.item(6)%>"
/ questions = [1=participantName1; 2=participantName2; 3=participantName3]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<textbox participantName1>
/ caption = "1st Name:"
/ mask = alphabetic
</textbox>

<textbox participantName2>
/ caption = "2nd Name:"
/ mask = alphabetic
</textbox>

<textbox participantName3>
/ caption = "3rd Name:"
/ mask = alphabetic
</textbox>

<block namesBlock>
/ postinstructions = (result)
/ trials = [1=enterNames]
</block>

<page result>
^^Names entered by participant:
<%values.pName1%>, <%values.pName2%>, <%values.pName3%>
^^Filler names selected:
<%values.fName1%>, <%values.fName2%>, <%values.fName3%>
</page>

Hi Dave, thank you for your response! I have tried implementing your code, and it works by eliminating a duplicate name from the filler list (I have tested this using the "caption" in your code then removed the caption after because I didn't need it anymore). But I can't get the new filler list (or any filler names) to appear in the go/no-go task. In my previous code, I had the values specified namef1 = "CLAIRE". Now these values aren't specified (namef1= " "). Does that have to do with it? I will attach my code for reference. 
<survey names_24hours>
/ pages = [1=names_24hours_instruct; 2=names_24hours_1; 3=names_24hours_2; 4=names_24hours_3; 5=names_24hours_4; 6=names_24hours_5; 7=names_24hours_6; 8=names_24hours_7; 9=names_24hours_8; 10=names_24hours_9; 11=names_24hours_10]
/ responsefontstyle = ("Arial", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
/ branch = [if (survey.names_24hours.totaltrialcount >= 1) block.intro
]
/ screencolor = white
/ txcolor = black
</survey>

<surveypage names_24hours_instruct>
/ caption = "In the following task, we will ask you to name 10 people you had a recent interaction with. Please do NOT include people in your family. ~n

Please think about every person you interacted with since yesterday morning. This includes any form of interaction—whether in-person, over text, through a phone call, email, or a brief conversation. You do not need to know the person, but think about anyone you had any contact with.

You may not know the names of everyone you interacted with. If you don’t know someone’s name, please assign them a label that you will recognize later (e.g., 'classmate G' or 'barista N'). You will be asked about these names in a later task, so please use names or labels that you will be able to remember.

If two people you interacted with share a name, please type in the first letter of their last name as well.

Please click 'Continue' to begin."
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


<textbox names_24hours_1>
/ caption = "Name 1: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."

/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_1>
/ questions = [1=names_24hours_1]
/ ontrialend = [item.name_1.item = toupper (textbox.names_24hours_1.response)]
/ ontrialend = [values.name_1 = textbox.names_24hours_1.response]
/ ontrialend = [dropdown.d02.caption = values.name_1]
/ ontrialend = [
// some input sanitization
values.name_1 = capitalize(tolower(textbox.names_24hours_1.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_2>
/ caption = "Name 2: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_2>
/ questions = [1=names_24hours_2]
/ ontrialend = [item.name_2.item = toupper (textbox.names_24hours_2.response)]
/ ontrialend = [values.name_2 = textbox.names_24hours_2.response]
/ ontrialend = [dropdown.d02.caption = values.name_2]
/ ontrialend = [
// some input sanitization
values.name_2 = capitalize(tolower(textbox.names_24hours_2.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_3>
/ caption = "Name 3: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_3>
/ questions = [1=names_24hours_3]
/ ontrialend = [item.name_3.item = toupper (textbox.names_24hours_3.response)]
/ ontrialend = [values.name_3 = textbox.names_24hours_3.response]
/ ontrialend = [dropdown.d03.caption = values.name_3]
/ ontrialend = [
// some input sanitization
values.name_3 = capitalize(tolower(textbox.names_24hours_3.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_4>
/ caption = "Name 4: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_4>
/ questions = [1=names_24hours_4]
/ ontrialend = [item.name_4.item = toupper (textbox.names_24hours_4.response)]
/ ontrialend = [values.name_4 = textbox.names_24hours_4.response]
/ ontrialend = [dropdown.d04.caption = values.name_4]
/ ontrialend = [
// some input sanitization
values.name_4 = capitalize(tolower(textbox.names_24hours_4.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_5>
/ caption = "Name 5: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_5>
/ questions = [1=names_24hours_5]
/ ontrialend = [item.name_5.item = toupper (textbox.names_24hours_5.response)]
/ ontrialend = [values.name_5 = textbox.names_24hours_5.response]
/ ontrialend = [dropdown.d05.caption = values.name_5]
/ ontrialend = [
// some input sanitization
values.name_5 = capitalize(tolower(textbox.names_24hours_5.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_6>
/ caption = "Name 6: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_6>
/ questions = [1=names_24hours_6]
/ ontrialend = [item.name_6.item = toupper (textbox.names_24hours_6.response)]
/ ontrialend = [values.name_6 = textbox.names_24hours_6.response]
/ ontrialend = [dropdown.d06.caption = values.name_6]
/ ontrialend = [
// some input sanitization
values.name_6 = capitalize(tolower(textbox.names_24hours_6.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_7>
/ caption = "Name 7: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_7>
/ questions = [1=names_24hours_7]
/ ontrialend = [item.name_7.item = toupper (textbox.names_24hours_7.response)]
/ ontrialend = [values.name_7 = textbox.names_24hours_7.response]
/ ontrialend = [dropdown.d07.caption = values.name_7]
/ ontrialend = [
// some input sanitization
values.name_7 = capitalize(tolower(textbox.names_24hours_7.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_8>
/ caption = "Name 8: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_8>
/ questions = [1=names_24hours_8]
/ ontrialend = [item.name_8.item = toupper (textbox.names_24hours_8.response)]
/ ontrialend = [values.name_8 = textbox.names_24hours_8.response]
/ ontrialend = [dropdown.d08.caption = values.name_8]
/ ontrialend = [
// some input sanitization
values.name_8 = capitalize(tolower(textbox.names_24hours_8.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_9>
/ caption = "Name 9: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_9>
/ questions = [1=names_24hours_9]
/ ontrialend = [item.name_9.item = toupper (textbox.names_24hours_9.response)]
/ ontrialend = [values.name_9 = textbox.names_24hours_9.response]
/ ontrialend = [dropdown.d09.caption = values.name_9]
/ ontrialend = [
// some input sanitization
values.name_9 = capitalize(tolower(textbox.names_24hours_9.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_10>
/ caption = "Name 10: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_10>
/ questions = [1=names_24hours_10]
/ ontrialend = [item.name_10.item = toupper (textbox.names_24hours_10.response)]
/ ontrialend = [values.name_10 = textbox.names_24hours_10.response]
/ ontrialend = [dropdown.d10.caption = values.name_10]
/ ontrialend = [
// some input sanitization
values.name_10 = capitalize(tolower(textbox.names_24hours_10.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


------------------------------------------------------------------------------------
*** Friends go/no-go ******
------------------------------------------------------------------------------------

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
</values>

#copied code
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred","ANDREW", "WESLEY", "JONATHAN", "ADRIAN", "CAMERON", "HAILEY",
"NATALIE", "JOSEPHINE", "CAROLINE", "ALICE", "Freddie", "Alex", "Sarah", "Bobby")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.name_1, values.name_2, values.name_3,values.name_4, values.name_5, values.name_6,values.name_7, values.name_8,
values.name_9,values.name_10)
</list>

<values>
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
/ fName4 = ""
/ fName5 = ""
/ fName6 = ""
/ fName7 = ""
/ fName8 = ""
/ fName9 = ""
/ fName10 = ""
</values>

<item fName1>
</item>

<item fName2>
</item>

<item fName3>
</item>

<item fName4>
</item>

<item fName5>
</item>

<item fName6>
</item>

<item fName7>
</item>

<item fName8>
</item>

<item fName9>
</item>

<item fName10>
</item>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<text name_2>
/ numitems = 1
/ items = name_2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_2>
</item>

<text name_3>
/ numitems = 1
/ items = name_3    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_3>
</item>

<text name_4>
/ numitems = 1
/ items = name_4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_4>
</item>

<text name_5>
/ numitems = 1
/ items = name_5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_5>
</item>

<text name_6>
/ numitems = 1
/ items = name_6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_6>
</item>

<text name_7>
/ numitems = 1
/ items = name_7    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_7>
</item>

<text name_8>
/ numitems = 1
/ items = name_8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_8>
</item>

<text name_9>
/ numitems = 1
/ items = name_9    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_9>
</item>

<text name_10>
/ numitems = 1
/ items = name_10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_10>
</item>

<item friends_catLABEL>
/1 = "FRIENDS"
</item>

<item nonfriendsNoGo_catLABEL>
/1 = "NON-FRIENDS"
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<trial trial_name_2>
/ ontrialbegin = [
    trial.trial_name_2.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_2.resetStimulusFrames();
    values.respRT = trial.trial_name_2.latency;
    values.word = text.name_2.currentItem]
</trial>

<trial trial_name_3>
/ ontrialbegin = [
    trial.trial_name_3.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_3.resetStimulusFrames();
    values.respRT = trial.trial_name_3.latency;
    values.word = text.name_3.currentItem]
</trial>

<trial trial_name_4>
/ ontrialbegin = [
    trial.trial_name_4.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_4.resetStimulusFrames();
    values.respRT = trial.trial_name_4.latency;
    values.word = text.name_4.currentItem]
</trial>

<trial trial_name_5>
/ ontrialbegin = [
    trial.trial_name_5.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_5.resetStimulusFrames();
    values.respRT = trial.trial_name_5.latency;
    values.word = text.name_5.currentItem]
</trial>

<trial trial_name_6>
/ ontrialbegin = [
    trial.trial_name_6.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_6.resetStimulusFrames();
    values.respRT = trial.trial_name_6.latency;
    values.word = text.name_6.currentItem]
</trial>

<trial trial_name_7>
/ ontrialbegin = [
    trial.trial_name_7.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_7.resetStimulusFrames();
    values.respRT = trial.trial_name_7.latency;
    values.word = text.name_7.currentItem]
</trial>

<trial trial_name_8>
/ ontrialbegin = [
    trial.trial_name_8.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_8.resetStimulusFrames();
    values.respRT = trial.trial_name_8.latency;
    values.word = text.name_8.currentItem]
</trial>

<trial trial_name_9>
/ ontrialbegin = [
    trial.name_9.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_9.resetStimulusFrames();
    values.respRT = trial.trial_name_9.latency;
    values.word = text.name_9.currentItem]
</trial>

<trial trial_name_10>
/ ontrialbegin = [
    trial.name_10.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_10.resetStimulusFrames();
    values.respRT = trial.trial_name_10.latency;
    values.word = text.name_10.currentItem]
</trial>

<text fName1>
/ numitems = 1
/ items = fName1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName2>
/ numitems = 1
/ items = fName2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName3>
/ numitems = 1
/ items = fName3
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName4>
/ numitems = 1
/ items = fName4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName5>
/ numitems = 1
/ items = fName5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName6>
/ numitems = 1
/ items = fName6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName7>
/ numitems = 1
/ items = fName7
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName8>
/ numitems = 1
/ items = fName8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName9>
/ numitems = 1
/ items = fName9
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName10>
/ numitems = 1
/ items = fName10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<trial trial_name_11>
/ ontrialbegin = [
    trial.trial_name_11.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_11.resetStimulusFrames();
    values.respRT = trial.trial_name_11.latency;
    values.word = text.fName1.currentItem]
</trial>

<trial trial_name_12>
/ ontrialbegin = [
    trial.trial_name_12.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_12.resetStimulusFrames();
    values.respRT = trial.trial_name_12.latency;
    values.word = text.fName2.currentItem]
</trial>

<trial trial_name_13>
/ ontrialbegin = [
    trial.trial_name_13.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_13.resetStimulusFrames();
    values.respRT = trial.trial_name_13.latency;
    values.word = text.fName3.currentItem]
</trial>

<trial trial_name_14>
/ ontrialbegin = [
    trial.trial_name_14.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_14.resetStimulusFrames();
    values.respRT = trial.trial_name_14.latency;
    values.word = text.fName4.currentItem]
</trial>

<trial trial_name_15>
/ ontrialbegin = [
    trial.trial_name_15.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_15.resetStimulusFrames();
    values.respRT = trial.trial_name_15.latency;
    values.word = text.fName5.currentItem]
</trial>

<trial trial_name_16>
/ ontrialbegin = [
    trial.trial_name_16.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_16.resetStimulusFrames();
    values.respRT = trial.trial_name_16.latency;
    values.word = text.fName6.currentItem]
</trial>

<trial trial_name_17>
/ ontrialbegin = [
    trial.trial_name_17.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_17.resetStimulusFrames();
    values.respRT = trial.trial_name_17.latency;
    values.word = text.fName7.currentItem]
</trial>

<trial trial_name_18>
/ ontrialbegin = [
    trial.trial_name_18.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_18.resetStimulusFrames();
    values.respRT = trial.trial_name_18.latency;
    values.word = text.fName8.currentItem]
</trial>

<trial trial_name_19>
/ ontrialbegin = [
    trial.trial_name_19.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_19.resetStimulusFrames();
    values.respRT = trial.trial_name_19.latency;
    values.word = text.fName9.currentItem]
</trial>

<trial trial_name_20>
/ ontrialbegin = [
    trial.trial_name_20.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_20.resetStimulusFrames();
    values.respRT = trial.trial_name_20.latency;
    values.word = text.fName10.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>


<expressions>
/buttoninstruct1 = if (computer.hasKeyboard){
    "place your index finger on the space bar key"
} else {
    "place your index finger over the space bar button"
}
</expressions>

<parameters>
/fixationSize = 10%
/wordSize = 8%

/runPractice = true

/practiceFeedbackDuration = 1000
/getReadyDuration = 5000
/startFixation = 2500
/endFixation = 2000
/stimDuration = 450
/responseDuration = 1200

/goKey = " "
</parameters>

<values>
/index = 1
/iti = 1000

/respRT = 0
/responseCategory = ""

/GoStim = "neutral"
/NoGoStim = ""
/condition = ""
/word = ""
/feedback = 0
</values>

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
ai293 - 11/25/2024
Dave - 11/25/2024
Dave - 11/25/2024
ai293 - 11/24/2024
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



The first thing you need to do is check each name provided by the participant against your bank of 20 filler names. If it's a match, i.e. the name is in the bank, you need to remove that name from the bank. Out of the remaining names in the filler bank, pick 10 at random.

Whether you use lists for this or not, doesn't really matter. You can use lists, but you can also do without.

One way to go about this:
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.pName1, values.pName2, values.pName3)
</list>

<values>
/ pName1 = ""
/ pName2 = ""
/ pName3 = ""
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
</values>

<surveypage enterNames>
/ ontrialend = [
    // some input sanitization
    values.pName1 = capitalize(tolower(textbox.participantName1.response));
    values.pName2 = capitalize(tolower(textbox.participantName2.response));
    values.pName3 = capitalize(tolower(textbox.participantName3.response));
    // now check each entered name against the filler names
    // if there's a match, remove the name from the filler list
    var i = 0;
    while (i < list.participantNames.itemcount) {
        i += 1;
        var currentName = list.participantNames.item(i);
        var onFillerList = list.fillerNames.indexof(currentName);
        if (onFillerList != -1) { // if name matches one in the filler list
            list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
        };
    };
    // now pick filler names from the remaining
    values.fName1 = list.fillerNames.nextvalue;
    values.fName2 = list.fillerNames.nextvalue;
    values.fName3 = list.fillerNames.nextvalue;
]
/ caption = "Names in the filler bank:
<%list.fillerNames.item(1)%>, <%list.fillerNames.item(2)%>, <%list.fillerNames.item(3)%>,
<%list.fillerNames.item(4)%>, <%list.fillerNames.item(5)%>, <%list.fillerNames.item(6)%>"
/ questions = [1=participantName1; 2=participantName2; 3=participantName3]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<textbox participantName1>
/ caption = "1st Name:"
/ mask = alphabetic
</textbox>

<textbox participantName2>
/ caption = "2nd Name:"
/ mask = alphabetic
</textbox>

<textbox participantName3>
/ caption = "3rd Name:"
/ mask = alphabetic
</textbox>

<block namesBlock>
/ postinstructions = (result)
/ trials = [1=enterNames]
</block>

<page result>
^^Names entered by participant:
<%values.pName1%>, <%values.pName2%>, <%values.pName3%>
^^Filler names selected:
<%values.fName1%>, <%values.fName2%>, <%values.fName3%>
</page>

Hi Dave, thank you for your response! I have tried implementing your code, and it works by eliminating a duplicate name from the filler list (I have tested this using the "caption" in your code then removed the caption after because I didn't need it anymore). But I can't get the new filler list (or any filler names) to appear in the go/no-go task. In my previous code, I had the values specified namef1 = "CLAIRE". Now these values aren't specified (namef1= " "). Does that have to do with it? I will attach my code for reference. 
<survey names_24hours>
/ pages = [1=names_24hours_instruct; 2=names_24hours_1; 3=names_24hours_2; 4=names_24hours_3; 5=names_24hours_4; 6=names_24hours_5; 7=names_24hours_6; 8=names_24hours_7; 9=names_24hours_8; 10=names_24hours_9; 11=names_24hours_10]
/ responsefontstyle = ("Arial", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
/ branch = [if (survey.names_24hours.totaltrialcount >= 1) block.intro
]
/ screencolor = white
/ txcolor = black
</survey>

<surveypage names_24hours_instruct>
/ caption = "In the following task, we will ask you to name 10 people you had a recent interaction with. Please do NOT include people in your family. ~n

Please think about every person you interacted with since yesterday morning. This includes any form of interaction—whether in-person, over text, through a phone call, email, or a brief conversation. You do not need to know the person, but think about anyone you had any contact with.

You may not know the names of everyone you interacted with. If you don’t know someone’s name, please assign them a label that you will recognize later (e.g., 'classmate G' or 'barista N'). You will be asked about these names in a later task, so please use names or labels that you will be able to remember.

If two people you interacted with share a name, please type in the first letter of their last name as well.

Please click 'Continue' to begin."
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


<textbox names_24hours_1>
/ caption = "Name 1: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."

/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_1>
/ questions = [1=names_24hours_1]
/ ontrialend = [item.name_1.item = toupper (textbox.names_24hours_1.response)]
/ ontrialend = [values.name_1 = textbox.names_24hours_1.response]
/ ontrialend = [dropdown.d02.caption = values.name_1]
/ ontrialend = [
// some input sanitization
values.name_1 = capitalize(tolower(textbox.names_24hours_1.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_2>
/ caption = "Name 2: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_2>
/ questions = [1=names_24hours_2]
/ ontrialend = [item.name_2.item = toupper (textbox.names_24hours_2.response)]
/ ontrialend = [values.name_2 = textbox.names_24hours_2.response]
/ ontrialend = [dropdown.d02.caption = values.name_2]
/ ontrialend = [
// some input sanitization
values.name_2 = capitalize(tolower(textbox.names_24hours_2.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_3>
/ caption = "Name 3: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_3>
/ questions = [1=names_24hours_3]
/ ontrialend = [item.name_3.item = toupper (textbox.names_24hours_3.response)]
/ ontrialend = [values.name_3 = textbox.names_24hours_3.response]
/ ontrialend = [dropdown.d03.caption = values.name_3]
/ ontrialend = [
// some input sanitization
values.name_3 = capitalize(tolower(textbox.names_24hours_3.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_4>
/ caption = "Name 4: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_4>
/ questions = [1=names_24hours_4]
/ ontrialend = [item.name_4.item = toupper (textbox.names_24hours_4.response)]
/ ontrialend = [values.name_4 = textbox.names_24hours_4.response]
/ ontrialend = [dropdown.d04.caption = values.name_4]
/ ontrialend = [
// some input sanitization
values.name_4 = capitalize(tolower(textbox.names_24hours_4.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_5>
/ caption = "Name 5: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_5>
/ questions = [1=names_24hours_5]
/ ontrialend = [item.name_5.item = toupper (textbox.names_24hours_5.response)]
/ ontrialend = [values.name_5 = textbox.names_24hours_5.response]
/ ontrialend = [dropdown.d05.caption = values.name_5]
/ ontrialend = [
// some input sanitization
values.name_5 = capitalize(tolower(textbox.names_24hours_5.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_6>
/ caption = "Name 6: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_6>
/ questions = [1=names_24hours_6]
/ ontrialend = [item.name_6.item = toupper (textbox.names_24hours_6.response)]
/ ontrialend = [values.name_6 = textbox.names_24hours_6.response]
/ ontrialend = [dropdown.d06.caption = values.name_6]
/ ontrialend = [
// some input sanitization
values.name_6 = capitalize(tolower(textbox.names_24hours_6.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_7>
/ caption = "Name 7: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_7>
/ questions = [1=names_24hours_7]
/ ontrialend = [item.name_7.item = toupper (textbox.names_24hours_7.response)]
/ ontrialend = [values.name_7 = textbox.names_24hours_7.response]
/ ontrialend = [dropdown.d07.caption = values.name_7]
/ ontrialend = [
// some input sanitization
values.name_7 = capitalize(tolower(textbox.names_24hours_7.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_8>
/ caption = "Name 8: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_8>
/ questions = [1=names_24hours_8]
/ ontrialend = [item.name_8.item = toupper (textbox.names_24hours_8.response)]
/ ontrialend = [values.name_8 = textbox.names_24hours_8.response]
/ ontrialend = [dropdown.d08.caption = values.name_8]
/ ontrialend = [
// some input sanitization
values.name_8 = capitalize(tolower(textbox.names_24hours_8.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_9>
/ caption = "Name 9: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_9>
/ questions = [1=names_24hours_9]
/ ontrialend = [item.name_9.item = toupper (textbox.names_24hours_9.response)]
/ ontrialend = [values.name_9 = textbox.names_24hours_9.response]
/ ontrialend = [dropdown.d09.caption = values.name_9]
/ ontrialend = [
// some input sanitization
values.name_9 = capitalize(tolower(textbox.names_24hours_9.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_10>
/ caption = "Name 10: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_10>
/ questions = [1=names_24hours_10]
/ ontrialend = [item.name_10.item = toupper (textbox.names_24hours_10.response)]
/ ontrialend = [values.name_10 = textbox.names_24hours_10.response]
/ ontrialend = [dropdown.d10.caption = values.name_10]
/ ontrialend = [
// some input sanitization
values.name_10 = capitalize(tolower(textbox.names_24hours_10.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


------------------------------------------------------------------------------------
*** Friends go/no-go ******
------------------------------------------------------------------------------------

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
</values>

#copied code
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred","ANDREW", "WESLEY", "JONATHAN", "ADRIAN", "CAMERON", "HAILEY",
"NATALIE", "JOSEPHINE", "CAROLINE", "ALICE", "Freddie", "Alex", "Sarah", "Bobby")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.name_1, values.name_2, values.name_3,values.name_4, values.name_5, values.name_6,values.name_7, values.name_8,
values.name_9,values.name_10)
</list>

<values>
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
/ fName4 = ""
/ fName5 = ""
/ fName6 = ""
/ fName7 = ""
/ fName8 = ""
/ fName9 = ""
/ fName10 = ""
</values>

<item fName1>
</item>

<item fName2>
</item>

<item fName3>
</item>

<item fName4>
</item>

<item fName5>
</item>

<item fName6>
</item>

<item fName7>
</item>

<item fName8>
</item>

<item fName9>
</item>

<item fName10>
</item>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<text name_2>
/ numitems = 1
/ items = name_2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_2>
</item>

<text name_3>
/ numitems = 1
/ items = name_3    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_3>
</item>

<text name_4>
/ numitems = 1
/ items = name_4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_4>
</item>

<text name_5>
/ numitems = 1
/ items = name_5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_5>
</item>

<text name_6>
/ numitems = 1
/ items = name_6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_6>
</item>

<text name_7>
/ numitems = 1
/ items = name_7    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_7>
</item>

<text name_8>
/ numitems = 1
/ items = name_8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_8>
</item>

<text name_9>
/ numitems = 1
/ items = name_9    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_9>
</item>

<text name_10>
/ numitems = 1
/ items = name_10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_10>
</item>

<item friends_catLABEL>
/1 = "FRIENDS"
</item>

<item nonfriendsNoGo_catLABEL>
/1 = "NON-FRIENDS"
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<trial trial_name_2>
/ ontrialbegin = [
    trial.trial_name_2.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_2.resetStimulusFrames();
    values.respRT = trial.trial_name_2.latency;
    values.word = text.name_2.currentItem]
</trial>

<trial trial_name_3>
/ ontrialbegin = [
    trial.trial_name_3.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_3.resetStimulusFrames();
    values.respRT = trial.trial_name_3.latency;
    values.word = text.name_3.currentItem]
</trial>

<trial trial_name_4>
/ ontrialbegin = [
    trial.trial_name_4.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_4.resetStimulusFrames();
    values.respRT = trial.trial_name_4.latency;
    values.word = text.name_4.currentItem]
</trial>

<trial trial_name_5>
/ ontrialbegin = [
    trial.trial_name_5.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_5.resetStimulusFrames();
    values.respRT = trial.trial_name_5.latency;
    values.word = text.name_5.currentItem]
</trial>

<trial trial_name_6>
/ ontrialbegin = [
    trial.trial_name_6.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_6.resetStimulusFrames();
    values.respRT = trial.trial_name_6.latency;
    values.word = text.name_6.currentItem]
</trial>

<trial trial_name_7>
/ ontrialbegin = [
    trial.trial_name_7.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_7.resetStimulusFrames();
    values.respRT = trial.trial_name_7.latency;
    values.word = text.name_7.currentItem]
</trial>

<trial trial_name_8>
/ ontrialbegin = [
    trial.trial_name_8.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_8.resetStimulusFrames();
    values.respRT = trial.trial_name_8.latency;
    values.word = text.name_8.currentItem]
</trial>

<trial trial_name_9>
/ ontrialbegin = [
    trial.name_9.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_9.resetStimulusFrames();
    values.respRT = trial.trial_name_9.latency;
    values.word = text.name_9.currentItem]
</trial>

<trial trial_name_10>
/ ontrialbegin = [
    trial.name_10.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_10.resetStimulusFrames();
    values.respRT = trial.trial_name_10.latency;
    values.word = text.name_10.currentItem]
</trial>

<text fName1>
/ numitems = 1
/ items = fName1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName2>
/ numitems = 1
/ items = fName2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName3>
/ numitems = 1
/ items = fName3
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName4>
/ numitems = 1
/ items = fName4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName5>
/ numitems = 1
/ items = fName5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName6>
/ numitems = 1
/ items = fName6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName7>
/ numitems = 1
/ items = fName7
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName8>
/ numitems = 1
/ items = fName8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName9>
/ numitems = 1
/ items = fName9
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName10>
/ numitems = 1
/ items = fName10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<trial trial_name_11>
/ ontrialbegin = [
    trial.trial_name_11.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_11.resetStimulusFrames();
    values.respRT = trial.trial_name_11.latency;
    values.word = text.fName1.currentItem]
</trial>

<trial trial_name_12>
/ ontrialbegin = [
    trial.trial_name_12.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_12.resetStimulusFrames();
    values.respRT = trial.trial_name_12.latency;
    values.word = text.fName2.currentItem]
</trial>

<trial trial_name_13>
/ ontrialbegin = [
    trial.trial_name_13.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_13.resetStimulusFrames();
    values.respRT = trial.trial_name_13.latency;
    values.word = text.fName3.currentItem]
</trial>

<trial trial_name_14>
/ ontrialbegin = [
    trial.trial_name_14.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_14.resetStimulusFrames();
    values.respRT = trial.trial_name_14.latency;
    values.word = text.fName4.currentItem]
</trial>

<trial trial_name_15>
/ ontrialbegin = [
    trial.trial_name_15.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_15.resetStimulusFrames();
    values.respRT = trial.trial_name_15.latency;
    values.word = text.fName5.currentItem]
</trial>

<trial trial_name_16>
/ ontrialbegin = [
    trial.trial_name_16.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_16.resetStimulusFrames();
    values.respRT = trial.trial_name_16.latency;
    values.word = text.fName6.currentItem]
</trial>

<trial trial_name_17>
/ ontrialbegin = [
    trial.trial_name_17.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_17.resetStimulusFrames();
    values.respRT = trial.trial_name_17.latency;
    values.word = text.fName7.currentItem]
</trial>

<trial trial_name_18>
/ ontrialbegin = [
    trial.trial_name_18.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_18.resetStimulusFrames();
    values.respRT = trial.trial_name_18.latency;
    values.word = text.fName8.currentItem]
</trial>

<trial trial_name_19>
/ ontrialbegin = [
    trial.trial_name_19.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_19.resetStimulusFrames();
    values.respRT = trial.trial_name_19.latency;
    values.word = text.fName9.currentItem]
</trial>

<trial trial_name_20>
/ ontrialbegin = [
    trial.trial_name_20.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_20.resetStimulusFrames();
    values.respRT = trial.trial_name_20.latency;
    values.word = text.fName10.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>


<expressions>
/buttoninstruct1 = if (computer.hasKeyboard){
    "place your index finger on the space bar key"
} else {
    "place your index finger over the space bar button"
}
</expressions>

<parameters>
/fixationSize = 10%
/wordSize = 8%

/runPractice = true

/practiceFeedbackDuration = 1000
/getReadyDuration = 5000
/startFixation = 2500
/endFixation = 2000
/stimDuration = 450
/responseDuration = 1200

/goKey = " "
</parameters>

<values>
/index = 1
/iti = 1000

/respRT = 0
/responseCategory = ""

/GoStim = "neutral"
/NoGoStim = ""
/condition = ""
/word = ""
/feedback = 0
</values>

Perhaps you could fix up your code first such that it doesn't throw dozens of unrelated errors

ai293
ai293
Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)
Group: Forum Members
Posts: 7, Visits: 68
Dave - 11/25/2024
ai293 - 11/25/2024
Dave - 11/25/2024
Dave - 11/25/2024
ai293 - 11/24/2024
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



The first thing you need to do is check each name provided by the participant against your bank of 20 filler names. If it's a match, i.e. the name is in the bank, you need to remove that name from the bank. Out of the remaining names in the filler bank, pick 10 at random.

Whether you use lists for this or not, doesn't really matter. You can use lists, but you can also do without.

One way to go about this:
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.pName1, values.pName2, values.pName3)
</list>

<values>
/ pName1 = ""
/ pName2 = ""
/ pName3 = ""
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
</values>

<surveypage enterNames>
/ ontrialend = [
    // some input sanitization
    values.pName1 = capitalize(tolower(textbox.participantName1.response));
    values.pName2 = capitalize(tolower(textbox.participantName2.response));
    values.pName3 = capitalize(tolower(textbox.participantName3.response));
    // now check each entered name against the filler names
    // if there's a match, remove the name from the filler list
    var i = 0;
    while (i < list.participantNames.itemcount) {
        i += 1;
        var currentName = list.participantNames.item(i);
        var onFillerList = list.fillerNames.indexof(currentName);
        if (onFillerList != -1) { // if name matches one in the filler list
            list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
        };
    };
    // now pick filler names from the remaining
    values.fName1 = list.fillerNames.nextvalue;
    values.fName2 = list.fillerNames.nextvalue;
    values.fName3 = list.fillerNames.nextvalue;
]
/ caption = "Names in the filler bank:
<%list.fillerNames.item(1)%>, <%list.fillerNames.item(2)%>, <%list.fillerNames.item(3)%>,
<%list.fillerNames.item(4)%>, <%list.fillerNames.item(5)%>, <%list.fillerNames.item(6)%>"
/ questions = [1=participantName1; 2=participantName2; 3=participantName3]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<textbox participantName1>
/ caption = "1st Name:"
/ mask = alphabetic
</textbox>

<textbox participantName2>
/ caption = "2nd Name:"
/ mask = alphabetic
</textbox>

<textbox participantName3>
/ caption = "3rd Name:"
/ mask = alphabetic
</textbox>

<block namesBlock>
/ postinstructions = (result)
/ trials = [1=enterNames]
</block>

<page result>
^^Names entered by participant:
<%values.pName1%>, <%values.pName2%>, <%values.pName3%>
^^Filler names selected:
<%values.fName1%>, <%values.fName2%>, <%values.fName3%>
</page>

Hi Dave, thank you for your response! I have tried implementing your code, and it works by eliminating a duplicate name from the filler list (I have tested this using the "caption" in your code then removed the caption after because I didn't need it anymore). But I can't get the new filler list (or any filler names) to appear in the go/no-go task. In my previous code, I had the values specified namef1 = "CLAIRE". Now these values aren't specified (namef1= " "). Does that have to do with it? I will attach my code for reference. 
<survey names_24hours>
/ pages = [1=names_24hours_instruct; 2=names_24hours_1; 3=names_24hours_2; 4=names_24hours_3; 5=names_24hours_4; 6=names_24hours_5; 7=names_24hours_6; 8=names_24hours_7; 9=names_24hours_8; 10=names_24hours_9; 11=names_24hours_10]
/ responsefontstyle = ("Arial", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
/ branch = [if (survey.names_24hours.totaltrialcount >= 1) block.intro
]
/ screencolor = white
/ txcolor = black
</survey>

<surveypage names_24hours_instruct>
/ caption = "In the following task, we will ask you to name 10 people you had a recent interaction with. Please do NOT include people in your family. ~n

Please think about every person you interacted with since yesterday morning. This includes any form of interaction—whether in-person, over text, through a phone call, email, or a brief conversation. You do not need to know the person, but think about anyone you had any contact with.

You may not know the names of everyone you interacted with. If you don’t know someone’s name, please assign them a label that you will recognize later (e.g., 'classmate G' or 'barista N'). You will be asked about these names in a later task, so please use names or labels that you will be able to remember.

If two people you interacted with share a name, please type in the first letter of their last name as well.

Please click 'Continue' to begin."
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


<textbox names_24hours_1>
/ caption = "Name 1: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."

/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_1>
/ questions = [1=names_24hours_1]
/ ontrialend = [item.name_1.item = toupper (textbox.names_24hours_1.response)]
/ ontrialend = [values.name_1 = textbox.names_24hours_1.response]
/ ontrialend = [dropdown.d02.caption = values.name_1]
/ ontrialend = [
// some input sanitization
values.name_1 = capitalize(tolower(textbox.names_24hours_1.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_2>
/ caption = "Name 2: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_2>
/ questions = [1=names_24hours_2]
/ ontrialend = [item.name_2.item = toupper (textbox.names_24hours_2.response)]
/ ontrialend = [values.name_2 = textbox.names_24hours_2.response]
/ ontrialend = [dropdown.d02.caption = values.name_2]
/ ontrialend = [
// some input sanitization
values.name_2 = capitalize(tolower(textbox.names_24hours_2.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_3>
/ caption = "Name 3: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_3>
/ questions = [1=names_24hours_3]
/ ontrialend = [item.name_3.item = toupper (textbox.names_24hours_3.response)]
/ ontrialend = [values.name_3 = textbox.names_24hours_3.response]
/ ontrialend = [dropdown.d03.caption = values.name_3]
/ ontrialend = [
// some input sanitization
values.name_3 = capitalize(tolower(textbox.names_24hours_3.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_4>
/ caption = "Name 4: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_4>
/ questions = [1=names_24hours_4]
/ ontrialend = [item.name_4.item = toupper (textbox.names_24hours_4.response)]
/ ontrialend = [values.name_4 = textbox.names_24hours_4.response]
/ ontrialend = [dropdown.d04.caption = values.name_4]
/ ontrialend = [
// some input sanitization
values.name_4 = capitalize(tolower(textbox.names_24hours_4.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_5>
/ caption = "Name 5: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_5>
/ questions = [1=names_24hours_5]
/ ontrialend = [item.name_5.item = toupper (textbox.names_24hours_5.response)]
/ ontrialend = [values.name_5 = textbox.names_24hours_5.response]
/ ontrialend = [dropdown.d05.caption = values.name_5]
/ ontrialend = [
// some input sanitization
values.name_5 = capitalize(tolower(textbox.names_24hours_5.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_6>
/ caption = "Name 6: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_6>
/ questions = [1=names_24hours_6]
/ ontrialend = [item.name_6.item = toupper (textbox.names_24hours_6.response)]
/ ontrialend = [values.name_6 = textbox.names_24hours_6.response]
/ ontrialend = [dropdown.d06.caption = values.name_6]
/ ontrialend = [
// some input sanitization
values.name_6 = capitalize(tolower(textbox.names_24hours_6.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_7>
/ caption = "Name 7: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_7>
/ questions = [1=names_24hours_7]
/ ontrialend = [item.name_7.item = toupper (textbox.names_24hours_7.response)]
/ ontrialend = [values.name_7 = textbox.names_24hours_7.response]
/ ontrialend = [dropdown.d07.caption = values.name_7]
/ ontrialend = [
// some input sanitization
values.name_7 = capitalize(tolower(textbox.names_24hours_7.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_8>
/ caption = "Name 8: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_8>
/ questions = [1=names_24hours_8]
/ ontrialend = [item.name_8.item = toupper (textbox.names_24hours_8.response)]
/ ontrialend = [values.name_8 = textbox.names_24hours_8.response]
/ ontrialend = [dropdown.d08.caption = values.name_8]
/ ontrialend = [
// some input sanitization
values.name_8 = capitalize(tolower(textbox.names_24hours_8.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_9>
/ caption = "Name 9: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_9>
/ questions = [1=names_24hours_9]
/ ontrialend = [item.name_9.item = toupper (textbox.names_24hours_9.response)]
/ ontrialend = [values.name_9 = textbox.names_24hours_9.response]
/ ontrialend = [dropdown.d09.caption = values.name_9]
/ ontrialend = [
// some input sanitization
values.name_9 = capitalize(tolower(textbox.names_24hours_9.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_10>
/ caption = "Name 10: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_10>
/ questions = [1=names_24hours_10]
/ ontrialend = [item.name_10.item = toupper (textbox.names_24hours_10.response)]
/ ontrialend = [values.name_10 = textbox.names_24hours_10.response]
/ ontrialend = [dropdown.d10.caption = values.name_10]
/ ontrialend = [
// some input sanitization
values.name_10 = capitalize(tolower(textbox.names_24hours_10.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


------------------------------------------------------------------------------------
*** Friends go/no-go ******
------------------------------------------------------------------------------------

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
</values>

#copied code
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred","ANDREW", "WESLEY", "JONATHAN", "ADRIAN", "CAMERON", "HAILEY",
"NATALIE", "JOSEPHINE", "CAROLINE", "ALICE", "Freddie", "Alex", "Sarah", "Bobby")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.name_1, values.name_2, values.name_3,values.name_4, values.name_5, values.name_6,values.name_7, values.name_8,
values.name_9,values.name_10)
</list>

<values>
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
/ fName4 = ""
/ fName5 = ""
/ fName6 = ""
/ fName7 = ""
/ fName8 = ""
/ fName9 = ""
/ fName10 = ""
</values>

<item fName1>
</item>

<item fName2>
</item>

<item fName3>
</item>

<item fName4>
</item>

<item fName5>
</item>

<item fName6>
</item>

<item fName7>
</item>

<item fName8>
</item>

<item fName9>
</item>

<item fName10>
</item>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<text name_2>
/ numitems = 1
/ items = name_2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_2>
</item>

<text name_3>
/ numitems = 1
/ items = name_3    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_3>
</item>

<text name_4>
/ numitems = 1
/ items = name_4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_4>
</item>

<text name_5>
/ numitems = 1
/ items = name_5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_5>
</item>

<text name_6>
/ numitems = 1
/ items = name_6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_6>
</item>

<text name_7>
/ numitems = 1
/ items = name_7    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_7>
</item>

<text name_8>
/ numitems = 1
/ items = name_8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_8>
</item>

<text name_9>
/ numitems = 1
/ items = name_9    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_9>
</item>

<text name_10>
/ numitems = 1
/ items = name_10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_10>
</item>

<item friends_catLABEL>
/1 = "FRIENDS"
</item>

<item nonfriendsNoGo_catLABEL>
/1 = "NON-FRIENDS"
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<trial trial_name_2>
/ ontrialbegin = [
    trial.trial_name_2.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_2.resetStimulusFrames();
    values.respRT = trial.trial_name_2.latency;
    values.word = text.name_2.currentItem]
</trial>

<trial trial_name_3>
/ ontrialbegin = [
    trial.trial_name_3.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_3.resetStimulusFrames();
    values.respRT = trial.trial_name_3.latency;
    values.word = text.name_3.currentItem]
</trial>

<trial trial_name_4>
/ ontrialbegin = [
    trial.trial_name_4.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_4.resetStimulusFrames();
    values.respRT = trial.trial_name_4.latency;
    values.word = text.name_4.currentItem]
</trial>

<trial trial_name_5>
/ ontrialbegin = [
    trial.trial_name_5.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_5.resetStimulusFrames();
    values.respRT = trial.trial_name_5.latency;
    values.word = text.name_5.currentItem]
</trial>

<trial trial_name_6>
/ ontrialbegin = [
    trial.trial_name_6.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_6.resetStimulusFrames();
    values.respRT = trial.trial_name_6.latency;
    values.word = text.name_6.currentItem]
</trial>

<trial trial_name_7>
/ ontrialbegin = [
    trial.trial_name_7.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_7.resetStimulusFrames();
    values.respRT = trial.trial_name_7.latency;
    values.word = text.name_7.currentItem]
</trial>

<trial trial_name_8>
/ ontrialbegin = [
    trial.trial_name_8.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_8.resetStimulusFrames();
    values.respRT = trial.trial_name_8.latency;
    values.word = text.name_8.currentItem]
</trial>

<trial trial_name_9>
/ ontrialbegin = [
    trial.name_9.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_9.resetStimulusFrames();
    values.respRT = trial.trial_name_9.latency;
    values.word = text.name_9.currentItem]
</trial>

<trial trial_name_10>
/ ontrialbegin = [
    trial.name_10.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_10.resetStimulusFrames();
    values.respRT = trial.trial_name_10.latency;
    values.word = text.name_10.currentItem]
</trial>

<text fName1>
/ numitems = 1
/ items = fName1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName2>
/ numitems = 1
/ items = fName2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName3>
/ numitems = 1
/ items = fName3
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName4>
/ numitems = 1
/ items = fName4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName5>
/ numitems = 1
/ items = fName5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName6>
/ numitems = 1
/ items = fName6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName7>
/ numitems = 1
/ items = fName7
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName8>
/ numitems = 1
/ items = fName8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName9>
/ numitems = 1
/ items = fName9
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName10>
/ numitems = 1
/ items = fName10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<trial trial_name_11>
/ ontrialbegin = [
    trial.trial_name_11.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_11.resetStimulusFrames();
    values.respRT = trial.trial_name_11.latency;
    values.word = text.fName1.currentItem]
</trial>

<trial trial_name_12>
/ ontrialbegin = [
    trial.trial_name_12.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_12.resetStimulusFrames();
    values.respRT = trial.trial_name_12.latency;
    values.word = text.fName2.currentItem]
</trial>

<trial trial_name_13>
/ ontrialbegin = [
    trial.trial_name_13.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_13.resetStimulusFrames();
    values.respRT = trial.trial_name_13.latency;
    values.word = text.fName3.currentItem]
</trial>

<trial trial_name_14>
/ ontrialbegin = [
    trial.trial_name_14.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_14.resetStimulusFrames();
    values.respRT = trial.trial_name_14.latency;
    values.word = text.fName4.currentItem]
</trial>

<trial trial_name_15>
/ ontrialbegin = [
    trial.trial_name_15.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_15.resetStimulusFrames();
    values.respRT = trial.trial_name_15.latency;
    values.word = text.fName5.currentItem]
</trial>

<trial trial_name_16>
/ ontrialbegin = [
    trial.trial_name_16.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_16.resetStimulusFrames();
    values.respRT = trial.trial_name_16.latency;
    values.word = text.fName6.currentItem]
</trial>

<trial trial_name_17>
/ ontrialbegin = [
    trial.trial_name_17.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_17.resetStimulusFrames();
    values.respRT = trial.trial_name_17.latency;
    values.word = text.fName7.currentItem]
</trial>

<trial trial_name_18>
/ ontrialbegin = [
    trial.trial_name_18.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_18.resetStimulusFrames();
    values.respRT = trial.trial_name_18.latency;
    values.word = text.fName8.currentItem]
</trial>

<trial trial_name_19>
/ ontrialbegin = [
    trial.trial_name_19.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_19.resetStimulusFrames();
    values.respRT = trial.trial_name_19.latency;
    values.word = text.fName9.currentItem]
</trial>

<trial trial_name_20>
/ ontrialbegin = [
    trial.trial_name_20.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_20.resetStimulusFrames();
    values.respRT = trial.trial_name_20.latency;
    values.word = text.fName10.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>


<expressions>
/buttoninstruct1 = if (computer.hasKeyboard){
    "place your index finger on the space bar key"
} else {
    "place your index finger over the space bar button"
}
</expressions>

<parameters>
/fixationSize = 10%
/wordSize = 8%

/runPractice = true

/practiceFeedbackDuration = 1000
/getReadyDuration = 5000
/startFixation = 2500
/endFixation = 2000
/stimDuration = 450
/responseDuration = 1200

/goKey = " "
</parameters>

<values>
/index = 1
/iti = 1000

/respRT = 0
/responseCategory = ""

/GoStim = "neutral"
/NoGoStim = ""
/condition = ""
/word = ""
/feedback = 0
</values>

Perhaps you could fix up your code first such that it doesn't throw dozens of unrelated errors

Hi Dave,
Apologies, there are multiple tasks in this script, so I just copied the relevant ones, but in doing so, created new errors. I'm attaching the complete file here. This code runs error-free on my device.

Attachments
ai293
ai293
Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)
Group: Forum Members
Posts: 7, Visits: 68
ai293 - 11/25/2024
Dave - 11/25/2024
ai293 - 11/25/2024
Dave - 11/25/2024
Dave - 11/25/2024
ai293 - 11/24/2024
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



The first thing you need to do is check each name provided by the participant against your bank of 20 filler names. If it's a match, i.e. the name is in the bank, you need to remove that name from the bank. Out of the remaining names in the filler bank, pick 10 at random.

Whether you use lists for this or not, doesn't really matter. You can use lists, but you can also do without.

One way to go about this:
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.pName1, values.pName2, values.pName3)
</list>

<values>
/ pName1 = ""
/ pName2 = ""
/ pName3 = ""
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
</values>

<surveypage enterNames>
/ ontrialend = [
    // some input sanitization
    values.pName1 = capitalize(tolower(textbox.participantName1.response));
    values.pName2 = capitalize(tolower(textbox.participantName2.response));
    values.pName3 = capitalize(tolower(textbox.participantName3.response));
    // now check each entered name against the filler names
    // if there's a match, remove the name from the filler list
    var i = 0;
    while (i < list.participantNames.itemcount) {
        i += 1;
        var currentName = list.participantNames.item(i);
        var onFillerList = list.fillerNames.indexof(currentName);
        if (onFillerList != -1) { // if name matches one in the filler list
            list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
        };
    };
    // now pick filler names from the remaining
    values.fName1 = list.fillerNames.nextvalue;
    values.fName2 = list.fillerNames.nextvalue;
    values.fName3 = list.fillerNames.nextvalue;
]
/ caption = "Names in the filler bank:
<%list.fillerNames.item(1)%>, <%list.fillerNames.item(2)%>, <%list.fillerNames.item(3)%>,
<%list.fillerNames.item(4)%>, <%list.fillerNames.item(5)%>, <%list.fillerNames.item(6)%>"
/ questions = [1=participantName1; 2=participantName2; 3=participantName3]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<textbox participantName1>
/ caption = "1st Name:"
/ mask = alphabetic
</textbox>

<textbox participantName2>
/ caption = "2nd Name:"
/ mask = alphabetic
</textbox>

<textbox participantName3>
/ caption = "3rd Name:"
/ mask = alphabetic
</textbox>

<block namesBlock>
/ postinstructions = (result)
/ trials = [1=enterNames]
</block>

<page result>
^^Names entered by participant:
<%values.pName1%>, <%values.pName2%>, <%values.pName3%>
^^Filler names selected:
<%values.fName1%>, <%values.fName2%>, <%values.fName3%>
</page>

Hi Dave, thank you for your response! I have tried implementing your code, and it works by eliminating a duplicate name from the filler list (I have tested this using the "caption" in your code then removed the caption after because I didn't need it anymore). But I can't get the new filler list (or any filler names) to appear in the go/no-go task. In my previous code, I had the values specified namef1 = "CLAIRE". Now these values aren't specified (namef1= " "). Does that have to do with it? I will attach my code for reference. 
<survey names_24hours>
/ pages = [1=names_24hours_instruct; 2=names_24hours_1; 3=names_24hours_2; 4=names_24hours_3; 5=names_24hours_4; 6=names_24hours_5; 7=names_24hours_6; 8=names_24hours_7; 9=names_24hours_8; 10=names_24hours_9; 11=names_24hours_10]
/ responsefontstyle = ("Arial", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
/ branch = [if (survey.names_24hours.totaltrialcount >= 1) block.intro
]
/ screencolor = white
/ txcolor = black
</survey>

<surveypage names_24hours_instruct>
/ caption = "In the following task, we will ask you to name 10 people you had a recent interaction with. Please do NOT include people in your family. ~n

Please think about every person you interacted with since yesterday morning. This includes any form of interaction—whether in-person, over text, through a phone call, email, or a brief conversation. You do not need to know the person, but think about anyone you had any contact with.

You may not know the names of everyone you interacted with. If you don’t know someone’s name, please assign them a label that you will recognize later (e.g., 'classmate G' or 'barista N'). You will be asked about these names in a later task, so please use names or labels that you will be able to remember.

If two people you interacted with share a name, please type in the first letter of their last name as well.

Please click 'Continue' to begin."
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


<textbox names_24hours_1>
/ caption = "Name 1: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."

/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_1>
/ questions = [1=names_24hours_1]
/ ontrialend = [item.name_1.item = toupper (textbox.names_24hours_1.response)]
/ ontrialend = [values.name_1 = textbox.names_24hours_1.response]
/ ontrialend = [dropdown.d02.caption = values.name_1]
/ ontrialend = [
// some input sanitization
values.name_1 = capitalize(tolower(textbox.names_24hours_1.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_2>
/ caption = "Name 2: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_2>
/ questions = [1=names_24hours_2]
/ ontrialend = [item.name_2.item = toupper (textbox.names_24hours_2.response)]
/ ontrialend = [values.name_2 = textbox.names_24hours_2.response]
/ ontrialend = [dropdown.d02.caption = values.name_2]
/ ontrialend = [
// some input sanitization
values.name_2 = capitalize(tolower(textbox.names_24hours_2.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_3>
/ caption = "Name 3: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_3>
/ questions = [1=names_24hours_3]
/ ontrialend = [item.name_3.item = toupper (textbox.names_24hours_3.response)]
/ ontrialend = [values.name_3 = textbox.names_24hours_3.response]
/ ontrialend = [dropdown.d03.caption = values.name_3]
/ ontrialend = [
// some input sanitization
values.name_3 = capitalize(tolower(textbox.names_24hours_3.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_4>
/ caption = "Name 4: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_4>
/ questions = [1=names_24hours_4]
/ ontrialend = [item.name_4.item = toupper (textbox.names_24hours_4.response)]
/ ontrialend = [values.name_4 = textbox.names_24hours_4.response]
/ ontrialend = [dropdown.d04.caption = values.name_4]
/ ontrialend = [
// some input sanitization
values.name_4 = capitalize(tolower(textbox.names_24hours_4.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_5>
/ caption = "Name 5: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_5>
/ questions = [1=names_24hours_5]
/ ontrialend = [item.name_5.item = toupper (textbox.names_24hours_5.response)]
/ ontrialend = [values.name_5 = textbox.names_24hours_5.response]
/ ontrialend = [dropdown.d05.caption = values.name_5]
/ ontrialend = [
// some input sanitization
values.name_5 = capitalize(tolower(textbox.names_24hours_5.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_6>
/ caption = "Name 6: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_6>
/ questions = [1=names_24hours_6]
/ ontrialend = [item.name_6.item = toupper (textbox.names_24hours_6.response)]
/ ontrialend = [values.name_6 = textbox.names_24hours_6.response]
/ ontrialend = [dropdown.d06.caption = values.name_6]
/ ontrialend = [
// some input sanitization
values.name_6 = capitalize(tolower(textbox.names_24hours_6.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_7>
/ caption = "Name 7: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_7>
/ questions = [1=names_24hours_7]
/ ontrialend = [item.name_7.item = toupper (textbox.names_24hours_7.response)]
/ ontrialend = [values.name_7 = textbox.names_24hours_7.response]
/ ontrialend = [dropdown.d07.caption = values.name_7]
/ ontrialend = [
// some input sanitization
values.name_7 = capitalize(tolower(textbox.names_24hours_7.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_8>
/ caption = "Name 8: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_8>
/ questions = [1=names_24hours_8]
/ ontrialend = [item.name_8.item = toupper (textbox.names_24hours_8.response)]
/ ontrialend = [values.name_8 = textbox.names_24hours_8.response]
/ ontrialend = [dropdown.d08.caption = values.name_8]
/ ontrialend = [
// some input sanitization
values.name_8 = capitalize(tolower(textbox.names_24hours_8.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_9>
/ caption = "Name 9: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_9>
/ questions = [1=names_24hours_9]
/ ontrialend = [item.name_9.item = toupper (textbox.names_24hours_9.response)]
/ ontrialend = [values.name_9 = textbox.names_24hours_9.response]
/ ontrialend = [dropdown.d09.caption = values.name_9]
/ ontrialend = [
// some input sanitization
values.name_9 = capitalize(tolower(textbox.names_24hours_9.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_10>
/ caption = "Name 10: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_10>
/ questions = [1=names_24hours_10]
/ ontrialend = [item.name_10.item = toupper (textbox.names_24hours_10.response)]
/ ontrialend = [values.name_10 = textbox.names_24hours_10.response]
/ ontrialend = [dropdown.d10.caption = values.name_10]
/ ontrialend = [
// some input sanitization
values.name_10 = capitalize(tolower(textbox.names_24hours_10.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


------------------------------------------------------------------------------------
*** Friends go/no-go ******
------------------------------------------------------------------------------------

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
</values>

#copied code
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred","ANDREW", "WESLEY", "JONATHAN", "ADRIAN", "CAMERON", "HAILEY",
"NATALIE", "JOSEPHINE", "CAROLINE", "ALICE", "Freddie", "Alex", "Sarah", "Bobby")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.name_1, values.name_2, values.name_3,values.name_4, values.name_5, values.name_6,values.name_7, values.name_8,
values.name_9,values.name_10)
</list>

<values>
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
/ fName4 = ""
/ fName5 = ""
/ fName6 = ""
/ fName7 = ""
/ fName8 = ""
/ fName9 = ""
/ fName10 = ""
</values>

<item fName1>
</item>

<item fName2>
</item>

<item fName3>
</item>

<item fName4>
</item>

<item fName5>
</item>

<item fName6>
</item>

<item fName7>
</item>

<item fName8>
</item>

<item fName9>
</item>

<item fName10>
</item>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<text name_2>
/ numitems = 1
/ items = name_2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_2>
</item>

<text name_3>
/ numitems = 1
/ items = name_3    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_3>
</item>

<text name_4>
/ numitems = 1
/ items = name_4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_4>
</item>

<text name_5>
/ numitems = 1
/ items = name_5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_5>
</item>

<text name_6>
/ numitems = 1
/ items = name_6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_6>
</item>

<text name_7>
/ numitems = 1
/ items = name_7    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_7>
</item>

<text name_8>
/ numitems = 1
/ items = name_8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_8>
</item>

<text name_9>
/ numitems = 1
/ items = name_9    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_9>
</item>

<text name_10>
/ numitems = 1
/ items = name_10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_10>
</item>

<item friends_catLABEL>
/1 = "FRIENDS"
</item>

<item nonfriendsNoGo_catLABEL>
/1 = "NON-FRIENDS"
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<trial trial_name_2>
/ ontrialbegin = [
    trial.trial_name_2.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_2.resetStimulusFrames();
    values.respRT = trial.trial_name_2.latency;
    values.word = text.name_2.currentItem]
</trial>

<trial trial_name_3>
/ ontrialbegin = [
    trial.trial_name_3.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_3.resetStimulusFrames();
    values.respRT = trial.trial_name_3.latency;
    values.word = text.name_3.currentItem]
</trial>

<trial trial_name_4>
/ ontrialbegin = [
    trial.trial_name_4.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_4.resetStimulusFrames();
    values.respRT = trial.trial_name_4.latency;
    values.word = text.name_4.currentItem]
</trial>

<trial trial_name_5>
/ ontrialbegin = [
    trial.trial_name_5.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_5.resetStimulusFrames();
    values.respRT = trial.trial_name_5.latency;
    values.word = text.name_5.currentItem]
</trial>

<trial trial_name_6>
/ ontrialbegin = [
    trial.trial_name_6.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_6.resetStimulusFrames();
    values.respRT = trial.trial_name_6.latency;
    values.word = text.name_6.currentItem]
</trial>

<trial trial_name_7>
/ ontrialbegin = [
    trial.trial_name_7.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_7.resetStimulusFrames();
    values.respRT = trial.trial_name_7.latency;
    values.word = text.name_7.currentItem]
</trial>

<trial trial_name_8>
/ ontrialbegin = [
    trial.trial_name_8.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_8.resetStimulusFrames();
    values.respRT = trial.trial_name_8.latency;
    values.word = text.name_8.currentItem]
</trial>

<trial trial_name_9>
/ ontrialbegin = [
    trial.name_9.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_9.resetStimulusFrames();
    values.respRT = trial.trial_name_9.latency;
    values.word = text.name_9.currentItem]
</trial>

<trial trial_name_10>
/ ontrialbegin = [
    trial.name_10.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_10.resetStimulusFrames();
    values.respRT = trial.trial_name_10.latency;
    values.word = text.name_10.currentItem]
</trial>

<text fName1>
/ numitems = 1
/ items = fName1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName2>
/ numitems = 1
/ items = fName2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName3>
/ numitems = 1
/ items = fName3
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName4>
/ numitems = 1
/ items = fName4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName5>
/ numitems = 1
/ items = fName5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName6>
/ numitems = 1
/ items = fName6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName7>
/ numitems = 1
/ items = fName7
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName8>
/ numitems = 1
/ items = fName8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName9>
/ numitems = 1
/ items = fName9
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName10>
/ numitems = 1
/ items = fName10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<trial trial_name_11>
/ ontrialbegin = [
    trial.trial_name_11.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_11.resetStimulusFrames();
    values.respRT = trial.trial_name_11.latency;
    values.word = text.fName1.currentItem]
</trial>

<trial trial_name_12>
/ ontrialbegin = [
    trial.trial_name_12.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_12.resetStimulusFrames();
    values.respRT = trial.trial_name_12.latency;
    values.word = text.fName2.currentItem]
</trial>

<trial trial_name_13>
/ ontrialbegin = [
    trial.trial_name_13.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_13.resetStimulusFrames();
    values.respRT = trial.trial_name_13.latency;
    values.word = text.fName3.currentItem]
</trial>

<trial trial_name_14>
/ ontrialbegin = [
    trial.trial_name_14.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_14.resetStimulusFrames();
    values.respRT = trial.trial_name_14.latency;
    values.word = text.fName4.currentItem]
</trial>

<trial trial_name_15>
/ ontrialbegin = [
    trial.trial_name_15.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_15.resetStimulusFrames();
    values.respRT = trial.trial_name_15.latency;
    values.word = text.fName5.currentItem]
</trial>

<trial trial_name_16>
/ ontrialbegin = [
    trial.trial_name_16.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_16.resetStimulusFrames();
    values.respRT = trial.trial_name_16.latency;
    values.word = text.fName6.currentItem]
</trial>

<trial trial_name_17>
/ ontrialbegin = [
    trial.trial_name_17.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_17.resetStimulusFrames();
    values.respRT = trial.trial_name_17.latency;
    values.word = text.fName7.currentItem]
</trial>

<trial trial_name_18>
/ ontrialbegin = [
    trial.trial_name_18.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_18.resetStimulusFrames();
    values.respRT = trial.trial_name_18.latency;
    values.word = text.fName8.currentItem]
</trial>

<trial trial_name_19>
/ ontrialbegin = [
    trial.trial_name_19.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_19.resetStimulusFrames();
    values.respRT = trial.trial_name_19.latency;
    values.word = text.fName9.currentItem]
</trial>

<trial trial_name_20>
/ ontrialbegin = [
    trial.trial_name_20.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_20.resetStimulusFrames();
    values.respRT = trial.trial_name_20.latency;
    values.word = text.fName10.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>


<expressions>
/buttoninstruct1 = if (computer.hasKeyboard){
    "place your index finger on the space bar key"
} else {
    "place your index finger over the space bar button"
}
</expressions>

<parameters>
/fixationSize = 10%
/wordSize = 8%

/runPractice = true

/practiceFeedbackDuration = 1000
/getReadyDuration = 5000
/startFixation = 2500
/endFixation = 2000
/stimDuration = 450
/responseDuration = 1200

/goKey = " "
</parameters>

<values>
/index = 1
/iti = 1000

/respRT = 0
/responseCategory = ""

/GoStim = "neutral"
/NoGoStim = ""
/condition = ""
/word = ""
/feedback = 0
</values>

Perhaps you could fix up your code first such that it doesn't throw dozens of unrelated errors

Hi Dave,
Apologies, there are multiple tasks in this script, so I just copied the relevant ones, but in doing so, created new errors. I'm attaching the complete file here. This code runs error-free on my device.

for reference, the survey where participants enter names is <survey names_24hours> and the go/no go task is under <block names_gono>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
ai293 - 11/25/2024
Dave - 11/25/2024
ai293 - 11/25/2024
Dave - 11/25/2024
Dave - 11/25/2024
ai293 - 11/24/2024
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



The first thing you need to do is check each name provided by the participant against your bank of 20 filler names. If it's a match, i.e. the name is in the bank, you need to remove that name from the bank. Out of the remaining names in the filler bank, pick 10 at random.

Whether you use lists for this or not, doesn't really matter. You can use lists, but you can also do without.

One way to go about this:
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.pName1, values.pName2, values.pName3)
</list>

<values>
/ pName1 = ""
/ pName2 = ""
/ pName3 = ""
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
</values>

<surveypage enterNames>
/ ontrialend = [
    // some input sanitization
    values.pName1 = capitalize(tolower(textbox.participantName1.response));
    values.pName2 = capitalize(tolower(textbox.participantName2.response));
    values.pName3 = capitalize(tolower(textbox.participantName3.response));
    // now check each entered name against the filler names
    // if there's a match, remove the name from the filler list
    var i = 0;
    while (i < list.participantNames.itemcount) {
        i += 1;
        var currentName = list.participantNames.item(i);
        var onFillerList = list.fillerNames.indexof(currentName);
        if (onFillerList != -1) { // if name matches one in the filler list
            list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
        };
    };
    // now pick filler names from the remaining
    values.fName1 = list.fillerNames.nextvalue;
    values.fName2 = list.fillerNames.nextvalue;
    values.fName3 = list.fillerNames.nextvalue;
]
/ caption = "Names in the filler bank:
<%list.fillerNames.item(1)%>, <%list.fillerNames.item(2)%>, <%list.fillerNames.item(3)%>,
<%list.fillerNames.item(4)%>, <%list.fillerNames.item(5)%>, <%list.fillerNames.item(6)%>"
/ questions = [1=participantName1; 2=participantName2; 3=participantName3]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<textbox participantName1>
/ caption = "1st Name:"
/ mask = alphabetic
</textbox>

<textbox participantName2>
/ caption = "2nd Name:"
/ mask = alphabetic
</textbox>

<textbox participantName3>
/ caption = "3rd Name:"
/ mask = alphabetic
</textbox>

<block namesBlock>
/ postinstructions = (result)
/ trials = [1=enterNames]
</block>

<page result>
^^Names entered by participant:
<%values.pName1%>, <%values.pName2%>, <%values.pName3%>
^^Filler names selected:
<%values.fName1%>, <%values.fName2%>, <%values.fName3%>
</page>

Hi Dave, thank you for your response! I have tried implementing your code, and it works by eliminating a duplicate name from the filler list (I have tested this using the "caption" in your code then removed the caption after because I didn't need it anymore). But I can't get the new filler list (or any filler names) to appear in the go/no-go task. In my previous code, I had the values specified namef1 = "CLAIRE". Now these values aren't specified (namef1= " "). Does that have to do with it? I will attach my code for reference. 
<survey names_24hours>
/ pages = [1=names_24hours_instruct; 2=names_24hours_1; 3=names_24hours_2; 4=names_24hours_3; 5=names_24hours_4; 6=names_24hours_5; 7=names_24hours_6; 8=names_24hours_7; 9=names_24hours_8; 10=names_24hours_9; 11=names_24hours_10]
/ responsefontstyle = ("Arial", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
/ branch = [if (survey.names_24hours.totaltrialcount >= 1) block.intro
]
/ screencolor = white
/ txcolor = black
</survey>

<surveypage names_24hours_instruct>
/ caption = "In the following task, we will ask you to name 10 people you had a recent interaction with. Please do NOT include people in your family. ~n

Please think about every person you interacted with since yesterday morning. This includes any form of interaction—whether in-person, over text, through a phone call, email, or a brief conversation. You do not need to know the person, but think about anyone you had any contact with.

You may not know the names of everyone you interacted with. If you don’t know someone’s name, please assign them a label that you will recognize later (e.g., 'classmate G' or 'barista N'). You will be asked about these names in a later task, so please use names or labels that you will be able to remember.

If two people you interacted with share a name, please type in the first letter of their last name as well.

Please click 'Continue' to begin."
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


<textbox names_24hours_1>
/ caption = "Name 1: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."

/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_1>
/ questions = [1=names_24hours_1]
/ ontrialend = [item.name_1.item = toupper (textbox.names_24hours_1.response)]
/ ontrialend = [values.name_1 = textbox.names_24hours_1.response]
/ ontrialend = [dropdown.d02.caption = values.name_1]
/ ontrialend = [
// some input sanitization
values.name_1 = capitalize(tolower(textbox.names_24hours_1.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_2>
/ caption = "Name 2: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_2>
/ questions = [1=names_24hours_2]
/ ontrialend = [item.name_2.item = toupper (textbox.names_24hours_2.response)]
/ ontrialend = [values.name_2 = textbox.names_24hours_2.response]
/ ontrialend = [dropdown.d02.caption = values.name_2]
/ ontrialend = [
// some input sanitization
values.name_2 = capitalize(tolower(textbox.names_24hours_2.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_3>
/ caption = "Name 3: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_3>
/ questions = [1=names_24hours_3]
/ ontrialend = [item.name_3.item = toupper (textbox.names_24hours_3.response)]
/ ontrialend = [values.name_3 = textbox.names_24hours_3.response]
/ ontrialend = [dropdown.d03.caption = values.name_3]
/ ontrialend = [
// some input sanitization
values.name_3 = capitalize(tolower(textbox.names_24hours_3.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_4>
/ caption = "Name 4: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_4>
/ questions = [1=names_24hours_4]
/ ontrialend = [item.name_4.item = toupper (textbox.names_24hours_4.response)]
/ ontrialend = [values.name_4 = textbox.names_24hours_4.response]
/ ontrialend = [dropdown.d04.caption = values.name_4]
/ ontrialend = [
// some input sanitization
values.name_4 = capitalize(tolower(textbox.names_24hours_4.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_5>
/ caption = "Name 5: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_5>
/ questions = [1=names_24hours_5]
/ ontrialend = [item.name_5.item = toupper (textbox.names_24hours_5.response)]
/ ontrialend = [values.name_5 = textbox.names_24hours_5.response]
/ ontrialend = [dropdown.d05.caption = values.name_5]
/ ontrialend = [
// some input sanitization
values.name_5 = capitalize(tolower(textbox.names_24hours_5.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_6>
/ caption = "Name 6: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_6>
/ questions = [1=names_24hours_6]
/ ontrialend = [item.name_6.item = toupper (textbox.names_24hours_6.response)]
/ ontrialend = [values.name_6 = textbox.names_24hours_6.response]
/ ontrialend = [dropdown.d06.caption = values.name_6]
/ ontrialend = [
// some input sanitization
values.name_6 = capitalize(tolower(textbox.names_24hours_6.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_7>
/ caption = "Name 7: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_7>
/ questions = [1=names_24hours_7]
/ ontrialend = [item.name_7.item = toupper (textbox.names_24hours_7.response)]
/ ontrialend = [values.name_7 = textbox.names_24hours_7.response]
/ ontrialend = [dropdown.d07.caption = values.name_7]
/ ontrialend = [
// some input sanitization
values.name_7 = capitalize(tolower(textbox.names_24hours_7.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_8>
/ caption = "Name 8: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_8>
/ questions = [1=names_24hours_8]
/ ontrialend = [item.name_8.item = toupper (textbox.names_24hours_8.response)]
/ ontrialend = [values.name_8 = textbox.names_24hours_8.response]
/ ontrialend = [dropdown.d08.caption = values.name_8]
/ ontrialend = [
// some input sanitization
values.name_8 = capitalize(tolower(textbox.names_24hours_8.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_9>
/ caption = "Name 9: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_9>
/ questions = [1=names_24hours_9]
/ ontrialend = [item.name_9.item = toupper (textbox.names_24hours_9.response)]
/ ontrialend = [values.name_9 = textbox.names_24hours_9.response]
/ ontrialend = [dropdown.d09.caption = values.name_9]
/ ontrialend = [
// some input sanitization
values.name_9 = capitalize(tolower(textbox.names_24hours_9.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_10>
/ caption = "Name 10: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_10>
/ questions = [1=names_24hours_10]
/ ontrialend = [item.name_10.item = toupper (textbox.names_24hours_10.response)]
/ ontrialend = [values.name_10 = textbox.names_24hours_10.response]
/ ontrialend = [dropdown.d10.caption = values.name_10]
/ ontrialend = [
// some input sanitization
values.name_10 = capitalize(tolower(textbox.names_24hours_10.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


------------------------------------------------------------------------------------
*** Friends go/no-go ******
------------------------------------------------------------------------------------

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
</values>

#copied code
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred","ANDREW", "WESLEY", "JONATHAN", "ADRIAN", "CAMERON", "HAILEY",
"NATALIE", "JOSEPHINE", "CAROLINE", "ALICE", "Freddie", "Alex", "Sarah", "Bobby")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.name_1, values.name_2, values.name_3,values.name_4, values.name_5, values.name_6,values.name_7, values.name_8,
values.name_9,values.name_10)
</list>

<values>
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
/ fName4 = ""
/ fName5 = ""
/ fName6 = ""
/ fName7 = ""
/ fName8 = ""
/ fName9 = ""
/ fName10 = ""
</values>

<item fName1>
</item>

<item fName2>
</item>

<item fName3>
</item>

<item fName4>
</item>

<item fName5>
</item>

<item fName6>
</item>

<item fName7>
</item>

<item fName8>
</item>

<item fName9>
</item>

<item fName10>
</item>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<text name_2>
/ numitems = 1
/ items = name_2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_2>
</item>

<text name_3>
/ numitems = 1
/ items = name_3    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_3>
</item>

<text name_4>
/ numitems = 1
/ items = name_4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_4>
</item>

<text name_5>
/ numitems = 1
/ items = name_5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_5>
</item>

<text name_6>
/ numitems = 1
/ items = name_6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_6>
</item>

<text name_7>
/ numitems = 1
/ items = name_7    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_7>
</item>

<text name_8>
/ numitems = 1
/ items = name_8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_8>
</item>

<text name_9>
/ numitems = 1
/ items = name_9    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_9>
</item>

<text name_10>
/ numitems = 1
/ items = name_10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_10>
</item>

<item friends_catLABEL>
/1 = "FRIENDS"
</item>

<item nonfriendsNoGo_catLABEL>
/1 = "NON-FRIENDS"
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<trial trial_name_2>
/ ontrialbegin = [
    trial.trial_name_2.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_2.resetStimulusFrames();
    values.respRT = trial.trial_name_2.latency;
    values.word = text.name_2.currentItem]
</trial>

<trial trial_name_3>
/ ontrialbegin = [
    trial.trial_name_3.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_3.resetStimulusFrames();
    values.respRT = trial.trial_name_3.latency;
    values.word = text.name_3.currentItem]
</trial>

<trial trial_name_4>
/ ontrialbegin = [
    trial.trial_name_4.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_4.resetStimulusFrames();
    values.respRT = trial.trial_name_4.latency;
    values.word = text.name_4.currentItem]
</trial>

<trial trial_name_5>
/ ontrialbegin = [
    trial.trial_name_5.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_5.resetStimulusFrames();
    values.respRT = trial.trial_name_5.latency;
    values.word = text.name_5.currentItem]
</trial>

<trial trial_name_6>
/ ontrialbegin = [
    trial.trial_name_6.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_6.resetStimulusFrames();
    values.respRT = trial.trial_name_6.latency;
    values.word = text.name_6.currentItem]
</trial>

<trial trial_name_7>
/ ontrialbegin = [
    trial.trial_name_7.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_7.resetStimulusFrames();
    values.respRT = trial.trial_name_7.latency;
    values.word = text.name_7.currentItem]
</trial>

<trial trial_name_8>
/ ontrialbegin = [
    trial.trial_name_8.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_8.resetStimulusFrames();
    values.respRT = trial.trial_name_8.latency;
    values.word = text.name_8.currentItem]
</trial>

<trial trial_name_9>
/ ontrialbegin = [
    trial.name_9.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_9.resetStimulusFrames();
    values.respRT = trial.trial_name_9.latency;
    values.word = text.name_9.currentItem]
</trial>

<trial trial_name_10>
/ ontrialbegin = [
    trial.name_10.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_10.resetStimulusFrames();
    values.respRT = trial.trial_name_10.latency;
    values.word = text.name_10.currentItem]
</trial>

<text fName1>
/ numitems = 1
/ items = fName1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName2>
/ numitems = 1
/ items = fName2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName3>
/ numitems = 1
/ items = fName3
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName4>
/ numitems = 1
/ items = fName4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName5>
/ numitems = 1
/ items = fName5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName6>
/ numitems = 1
/ items = fName6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName7>
/ numitems = 1
/ items = fName7
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName8>
/ numitems = 1
/ items = fName8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName9>
/ numitems = 1
/ items = fName9
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName10>
/ numitems = 1
/ items = fName10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<trial trial_name_11>
/ ontrialbegin = [
    trial.trial_name_11.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_11.resetStimulusFrames();
    values.respRT = trial.trial_name_11.latency;
    values.word = text.fName1.currentItem]
</trial>

<trial trial_name_12>
/ ontrialbegin = [
    trial.trial_name_12.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_12.resetStimulusFrames();
    values.respRT = trial.trial_name_12.latency;
    values.word = text.fName2.currentItem]
</trial>

<trial trial_name_13>
/ ontrialbegin = [
    trial.trial_name_13.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_13.resetStimulusFrames();
    values.respRT = trial.trial_name_13.latency;
    values.word = text.fName3.currentItem]
</trial>

<trial trial_name_14>
/ ontrialbegin = [
    trial.trial_name_14.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_14.resetStimulusFrames();
    values.respRT = trial.trial_name_14.latency;
    values.word = text.fName4.currentItem]
</trial>

<trial trial_name_15>
/ ontrialbegin = [
    trial.trial_name_15.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_15.resetStimulusFrames();
    values.respRT = trial.trial_name_15.latency;
    values.word = text.fName5.currentItem]
</trial>

<trial trial_name_16>
/ ontrialbegin = [
    trial.trial_name_16.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_16.resetStimulusFrames();
    values.respRT = trial.trial_name_16.latency;
    values.word = text.fName6.currentItem]
</trial>

<trial trial_name_17>
/ ontrialbegin = [
    trial.trial_name_17.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_17.resetStimulusFrames();
    values.respRT = trial.trial_name_17.latency;
    values.word = text.fName7.currentItem]
</trial>

<trial trial_name_18>
/ ontrialbegin = [
    trial.trial_name_18.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_18.resetStimulusFrames();
    values.respRT = trial.trial_name_18.latency;
    values.word = text.fName8.currentItem]
</trial>

<trial trial_name_19>
/ ontrialbegin = [
    trial.trial_name_19.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_19.resetStimulusFrames();
    values.respRT = trial.trial_name_19.latency;
    values.word = text.fName9.currentItem]
</trial>

<trial trial_name_20>
/ ontrialbegin = [
    trial.trial_name_20.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_20.resetStimulusFrames();
    values.respRT = trial.trial_name_20.latency;
    values.word = text.fName10.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>


<expressions>
/buttoninstruct1 = if (computer.hasKeyboard){
    "place your index finger on the space bar key"
} else {
    "place your index finger over the space bar button"
}
</expressions>

<parameters>
/fixationSize = 10%
/wordSize = 8%

/runPractice = true

/practiceFeedbackDuration = 1000
/getReadyDuration = 5000
/startFixation = 2500
/endFixation = 2000
/stimDuration = 450
/responseDuration = 1200

/goKey = " "
</parameters>

<values>
/index = 1
/iti = 1000

/respRT = 0
/responseCategory = ""

/GoStim = "neutral"
/NoGoStim = ""
/condition = ""
/word = ""
/feedback = 0
</values>

Perhaps you could fix up your code first such that it doesn't throw dozens of unrelated errors

Hi Dave,
Apologies, there are multiple tasks in this script, so I just copied the relevant ones, but in doing so, created new errors. I'm attaching the complete file here. This code runs error-free on my device.

This makes no sense.

<text fName1>
/ numitems = 1
/ items = fName1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>


The <item> elements referenced are empty -- and they remain empty, since you do nothing at all to fill them with anything.

<item fName1>
</item>

<item fName2>
</item>

<item fName3>
</item>

<item fName4>
</item>
...


If you want <text fName1> to display whatever name values.fName1 was set to, you simply do:

<text fName1>
/ items = ("<%values.fName1%>")
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>




ai293
ai293
Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)Associate Member (82 reputation)
Group: Forum Members
Posts: 7, Visits: 68
Dave - 11/25/2024
ai293 - 11/25/2024
Dave - 11/25/2024
ai293 - 11/25/2024
Dave - 11/25/2024
Dave - 11/25/2024
ai293 - 11/24/2024
Hi! I'm trying to build a modified go/no-go task that's based on participant inputs.

What I've done so far: Participants first respond to a survey asking them to list 10 names. After, the names are presented in a go/no-go task. In addition to the names that participants provide, I want to add 10 random names to the go/no-go as "neutral" stimuli (out of a bank of 20 names)

What I'm attempting to do but haven't figure out how to do yet:  I want to add a rule to my code where the random names that are thrown into the go/no-go are not the same as the names the participant has nominated (e.g., if the participant nominated the name "Claire," I want to avoid using the name "Claire" as my neutral stimulus). At the same time, if I use "Claire" as my neutral stimulus 1, I want "Claire" to repeat in each "chunk" in my block (for reference, see my block code below and how it's grouped into  4-23, 24-43, etc).

I have an intuition that I could use <list> for this, but I can't figure out whether using list is correct and how to integrate it into my code. Do I add the "list" at the end of each trial? Do I create a trial for each name in go/no-go task, even the neutral stimuli? I have added the code below for "name 1" just to make this clearer, but I could add my complete  code for all names if needed. Thanks!

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
/ name_11= "NEUTRAL_NAME1"
/ name_12= "NEUTRAL_NAME2"
/ name_13 = "NEUTRAL_NAME3"
/ name_14 = "NEUTRAL_NAME4"
/ name_15= "NEUTRAL_NAME5"
/ name_16 = "NEUTRAL_NAME6"
/ name_17 = "NEUTRAL_NAME7"
/ name_18 = "NEUTRAL_NAME8"
/ name_19= "NEUTRAL_NAME9"
/ name_20 = "NEUTRAL_NAME10"
/ name_21= "NEUTRAL_NAME11"
/ name_22= "NEUTRAL_NAME12"
/ name_23 = "NEUTRAL_NAME13"
/ name_24 = "NEUTRAL_NAME14"
/ name_25= "NEUTRAL_NAME15"
/ name_26 = "NEUTRAL_NAME16"
/ name_27 = "NEUTRAL_NAME17"
/ name_28 = "NEUTRAL_NAME18"
/ name_29= "NEUTRAL_NAME19"
/ name_30 = "NEUTRAL_NAME20"
</values>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>

<list list1>
/ items=[item.name_1; item.name_2; item.name_3; item.name_4; item.name_5; item.name_6; item.name_7; item.name_8; item.name_9; item.name_10]
</list>

<list list2>
/ items=[item.name_11; item.name_12; item.name_13; item.name_14; item.name_15; item.name_16; item.name_17; item.name_18; item.name_19;
item.name_20;item.name_21; item.name_22; item.name_23; item.name_24; item.name_25; item.name_26; item.name_27; item.name_28;
item.name_29;
item.name_30
]
/ selectionMode=random
/ not=[list.list1.currentValue]
</list>



The first thing you need to do is check each name provided by the participant against your bank of 20 filler names. If it's a match, i.e. the name is in the bank, you need to remove that name from the bank. Out of the remaining names in the filler bank, pick 10 at random.

Whether you use lists for this or not, doesn't really matter. You can use lists, but you can also do without.

One way to go about this:
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.pName1, values.pName2, values.pName3)
</list>

<values>
/ pName1 = ""
/ pName2 = ""
/ pName3 = ""
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
</values>

<surveypage enterNames>
/ ontrialend = [
    // some input sanitization
    values.pName1 = capitalize(tolower(textbox.participantName1.response));
    values.pName2 = capitalize(tolower(textbox.participantName2.response));
    values.pName3 = capitalize(tolower(textbox.participantName3.response));
    // now check each entered name against the filler names
    // if there's a match, remove the name from the filler list
    var i = 0;
    while (i < list.participantNames.itemcount) {
        i += 1;
        var currentName = list.participantNames.item(i);
        var onFillerList = list.fillerNames.indexof(currentName);
        if (onFillerList != -1) { // if name matches one in the filler list
            list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
        };
    };
    // now pick filler names from the remaining
    values.fName1 = list.fillerNames.nextvalue;
    values.fName2 = list.fillerNames.nextvalue;
    values.fName3 = list.fillerNames.nextvalue;
]
/ caption = "Names in the filler bank:
<%list.fillerNames.item(1)%>, <%list.fillerNames.item(2)%>, <%list.fillerNames.item(3)%>,
<%list.fillerNames.item(4)%>, <%list.fillerNames.item(5)%>, <%list.fillerNames.item(6)%>"
/ questions = [1=participantName1; 2=participantName2; 3=participantName3]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<textbox participantName1>
/ caption = "1st Name:"
/ mask = alphabetic
</textbox>

<textbox participantName2>
/ caption = "2nd Name:"
/ mask = alphabetic
</textbox>

<textbox participantName3>
/ caption = "3rd Name:"
/ mask = alphabetic
</textbox>

<block namesBlock>
/ postinstructions = (result)
/ trials = [1=enterNames]
</block>

<page result>
^^Names entered by participant:
<%values.pName1%>, <%values.pName2%>, <%values.pName3%>
^^Filler names selected:
<%values.fName1%>, <%values.fName2%>, <%values.fName3%>
</page>

Hi Dave, thank you for your response! I have tried implementing your code, and it works by eliminating a duplicate name from the filler list (I have tested this using the "caption" in your code then removed the caption after because I didn't need it anymore). But I can't get the new filler list (or any filler names) to appear in the go/no-go task. In my previous code, I had the values specified namef1 = "CLAIRE". Now these values aren't specified (namef1= " "). Does that have to do with it? I will attach my code for reference. 
<survey names_24hours>
/ pages = [1=names_24hours_instruct; 2=names_24hours_1; 3=names_24hours_2; 4=names_24hours_3; 5=names_24hours_4; 6=names_24hours_5; 7=names_24hours_6; 8=names_24hours_7; 9=names_24hours_8; 10=names_24hours_9; 11=names_24hours_10]
/ responsefontstyle = ("Arial", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
/ branch = [if (survey.names_24hours.totaltrialcount >= 1) block.intro
]
/ screencolor = white
/ txcolor = black
</survey>

<surveypage names_24hours_instruct>
/ caption = "In the following task, we will ask you to name 10 people you had a recent interaction with. Please do NOT include people in your family. ~n

Please think about every person you interacted with since yesterday morning. This includes any form of interaction—whether in-person, over text, through a phone call, email, or a brief conversation. You do not need to know the person, but think about anyone you had any contact with.

You may not know the names of everyone you interacted with. If you don’t know someone’s name, please assign them a label that you will recognize later (e.g., 'classmate G' or 'barista N'). You will be asked about these names in a later task, so please use names or labels that you will be able to remember.

If two people you interacted with share a name, please type in the first letter of their last name as well.

Please click 'Continue' to begin."
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


<textbox names_24hours_1>
/ caption = "Name 1: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."

/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_1>
/ questions = [1=names_24hours_1]
/ ontrialend = [item.name_1.item = toupper (textbox.names_24hours_1.response)]
/ ontrialend = [values.name_1 = textbox.names_24hours_1.response]
/ ontrialend = [dropdown.d02.caption = values.name_1]
/ ontrialend = [
// some input sanitization
values.name_1 = capitalize(tolower(textbox.names_24hours_1.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_2>
/ caption = "Name 2: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_2>
/ questions = [1=names_24hours_2]
/ ontrialend = [item.name_2.item = toupper (textbox.names_24hours_2.response)]
/ ontrialend = [values.name_2 = textbox.names_24hours_2.response]
/ ontrialend = [dropdown.d02.caption = values.name_2]
/ ontrialend = [
// some input sanitization
values.name_2 = capitalize(tolower(textbox.names_24hours_2.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_3>
/ caption = "Name 3: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_3>
/ questions = [1=names_24hours_3]
/ ontrialend = [item.name_3.item = toupper (textbox.names_24hours_3.response)]
/ ontrialend = [values.name_3 = textbox.names_24hours_3.response]
/ ontrialend = [dropdown.d03.caption = values.name_3]
/ ontrialend = [
// some input sanitization
values.name_3 = capitalize(tolower(textbox.names_24hours_3.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_4>
/ caption = "Name 4: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_4>
/ questions = [1=names_24hours_4]
/ ontrialend = [item.name_4.item = toupper (textbox.names_24hours_4.response)]
/ ontrialend = [values.name_4 = textbox.names_24hours_4.response]
/ ontrialend = [dropdown.d04.caption = values.name_4]
/ ontrialend = [
// some input sanitization
values.name_4 = capitalize(tolower(textbox.names_24hours_4.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_5>
/ caption = "Name 5: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_5>
/ questions = [1=names_24hours_5]
/ ontrialend = [item.name_5.item = toupper (textbox.names_24hours_5.response)]
/ ontrialend = [values.name_5 = textbox.names_24hours_5.response]
/ ontrialend = [dropdown.d05.caption = values.name_5]
/ ontrialend = [
// some input sanitization
values.name_5 = capitalize(tolower(textbox.names_24hours_5.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_6>
/ caption = "Name 6: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_6>
/ questions = [1=names_24hours_6]
/ ontrialend = [item.name_6.item = toupper (textbox.names_24hours_6.response)]
/ ontrialend = [values.name_6 = textbox.names_24hours_6.response]
/ ontrialend = [dropdown.d06.caption = values.name_6]
/ ontrialend = [
// some input sanitization
values.name_6 = capitalize(tolower(textbox.names_24hours_6.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_7>
/ caption = "Name 7: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_7>
/ questions = [1=names_24hours_7]
/ ontrialend = [item.name_7.item = toupper (textbox.names_24hours_7.response)]
/ ontrialend = [values.name_7 = textbox.names_24hours_7.response]
/ ontrialend = [dropdown.d07.caption = values.name_7]
/ ontrialend = [
// some input sanitization
values.name_7 = capitalize(tolower(textbox.names_24hours_7.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_8>
/ caption = "Name 8: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_8>
/ questions = [1=names_24hours_8]
/ ontrialend = [item.name_8.item = toupper (textbox.names_24hours_8.response)]
/ ontrialend = [values.name_8 = textbox.names_24hours_8.response]
/ ontrialend = [dropdown.d08.caption = values.name_8]
/ ontrialend = [
// some input sanitization
values.name_8 = capitalize(tolower(textbox.names_24hours_8.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_9>
/ caption = "Name 9: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_9>
/ questions = [1=names_24hours_9]
/ ontrialend = [item.name_9.item = toupper (textbox.names_24hours_9.response)]
/ ontrialend = [values.name_9 = textbox.names_24hours_9.response]
/ ontrialend = [dropdown.d09.caption = values.name_9]
/ ontrialend = [
// some input sanitization
values.name_9 = capitalize(tolower(textbox.names_24hours_9.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue
]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox names_24hours_10>
/ caption = "Name 10: In the text box provided, please type in the name of another person you interacted with since yesterday morning.

Please do NOT mention any family members. If this person shares a name with someone you mentioned earlier, please type in the first letter of their last name as well."
/ fontstyle = ("Arial", 13, false, false, false, false, 5, 0)
/ required = true
</textbox>

<surveypage names_24hours_10>
/ questions = [1=names_24hours_10]
/ ontrialend = [item.name_10.item = toupper (textbox.names_24hours_10.response)]
/ ontrialend = [values.name_10 = textbox.names_24hours_10.response]
/ ontrialend = [dropdown.d10.caption = values.name_10]
/ ontrialend = [
// some input sanitization
values.name_10 = capitalize(tolower(textbox.names_24hours_10.response));
// now check each entered name against the filler names
// if there's a match, remove the name from the filler list
var i = 0;
while (i < list.participantNames.itemcount) {
i += 1;
var currentName = list.participantNames.item(i);
var onFillerList = list.fillerNames.indexof(currentName);
if (onFillerList != -1) { // if name matches one in the filler list
list.fillerNames.removeitem(onFillerList); // remove that name from the filler list
};
};
// now pick filler names from the remaining
values.fName1 = list.fillerNames.nextvalue;
values.fName2 = list.fillerNames.nextvalue;
values.fName3 = list.fillerNames.nextvalue;
    values.fName4 = list.fillerNames.nextvalue;
values.fName5 = list.fillerNames.nextvalue;
values.fName6 = list.fillerNames.nextvalue;
    values.fName7 = list.fillerNames.nextvalue;
values.fName8 = list.fillerNames.nextvalue;
values.fName9 = list.fillerNames.nextvalue;
    values.fName10 = list.fillerNames.nextvalue]
/ finishlabel = "Continue"
/ nextlabel = "Continue"
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>


------------------------------------------------------------------------------------
*** Friends go/no-go ******
------------------------------------------------------------------------------------

<values>
/ quit = 0
/ complete = 0
/ name_1= ""
/ name_2 = ""
/ name_3 = ""
/ name_4 = ""
/ name_5= ""
/ name_6 = ""
/ name_7 = ""
/ name_8 = ""
/ name_9= ""
/ name_10 = ""
</values>

#copied code
<list fillerNames>
/ items = ("Anne", "Bob", "Claire", "Don", "Eve", "Fred","ANDREW", "WESLEY", "JONATHAN", "ADRIAN", "CAMERON", "HAILEY",
"NATALIE", "JOSEPHINE", "CAROLINE", "ALICE", "Freddie", "Alex", "Sarah", "Bobby")
/ selectionrate = always
</list>

<list participantNames>
/ items = (values.name_1, values.name_2, values.name_3,values.name_4, values.name_5, values.name_6,values.name_7, values.name_8,
values.name_9,values.name_10)
</list>

<values>
/ fName1 = ""
/ fName2 = ""
/ fName3 = ""
/ fName4 = ""
/ fName5 = ""
/ fName6 = ""
/ fName7 = ""
/ fName8 = ""
/ fName9 = ""
/ fName10 = ""
</values>

<item fName1>
</item>

<item fName2>
</item>

<item fName3>
</item>

<item fName4>
</item>

<item fName5>
</item>

<item fName6>
</item>

<item fName7>
</item>

<item fName8>
</item>

<item fName9>
</item>

<item fName10>
</item>

<text name_1>
/ numitems = 1
/ items = name_1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_1>
</item>

<text name_2>
/ numitems = 1
/ items = name_2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_2>
</item>

<text name_3>
/ numitems = 1
/ items = name_3    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_3>
</item>

<text name_4>
/ numitems = 1
/ items = name_4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_4>
</item>

<text name_5>
/ numitems = 1
/ items = name_5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_5>
</item>

<text name_6>
/ numitems = 1
/ items = name_6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_6>
</item>

<text name_7>
/ numitems = 1
/ items = name_7    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_7>
</item>

<text name_8>
/ numitems = 1
/ items = name_8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_8>
</item>

<text name_9>
/ numitems = 1
/ items = name_9    
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_9>
</item>

<text name_10>
/ numitems = 1
/ items = name_10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<item name_10>
</item>

<item friends_catLABEL>
/1 = "FRIENDS"
</item>

<item nonfriendsNoGo_catLABEL>
/1 = "NON-FRIENDS"
</item>

<trial trial_name_1>
/ ontrialbegin = [
    trial.trial_name_1.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_1.resetStimulusFrames();
    values.respRT = trial.trial_name_1.latency;
    values.word = text.name_1.currentItem]
</trial>

<trial trial_name_2>
/ ontrialbegin = [
    trial.trial_name_2.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_2.resetStimulusFrames();
    values.respRT = trial.trial_name_2.latency;
    values.word = text.name_2.currentItem]
</trial>

<trial trial_name_3>
/ ontrialbegin = [
    trial.trial_name_3.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_3.resetStimulusFrames();
    values.respRT = trial.trial_name_3.latency;
    values.word = text.name_3.currentItem]
</trial>

<trial trial_name_4>
/ ontrialbegin = [
    trial.trial_name_4.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_4.resetStimulusFrames();
    values.respRT = trial.trial_name_4.latency;
    values.word = text.name_4.currentItem]
</trial>

<trial trial_name_5>
/ ontrialbegin = [
    trial.trial_name_5.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_5.resetStimulusFrames();
    values.respRT = trial.trial_name_5.latency;
    values.word = text.name_5.currentItem]
</trial>

<trial trial_name_6>
/ ontrialbegin = [
    trial.trial_name_6.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_6.resetStimulusFrames();
    values.respRT = trial.trial_name_6.latency;
    values.word = text.name_6.currentItem]
</trial>

<trial trial_name_7>
/ ontrialbegin = [
    trial.trial_name_7.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_7.resetStimulusFrames();
    values.respRT = trial.trial_name_7.latency;
    values.word = text.name_7.currentItem]
</trial>

<trial trial_name_8>
/ ontrialbegin = [
    trial.trial_name_8.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_8.resetStimulusFrames();
    values.respRT = trial.trial_name_8.latency;
    values.word = text.name_8.currentItem]
</trial>

<trial trial_name_9>
/ ontrialbegin = [
    trial.name_9.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_9.resetStimulusFrames();
    values.respRT = trial.trial_name_9.latency;
    values.word = text.name_9.currentItem]
</trial>

<trial trial_name_10>
/ ontrialbegin = [
    trial.name_10.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = name_10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_10.resetStimulusFrames();
    values.respRT = trial.trial_name_10.latency;
    values.word = text.name_10.currentItem]
</trial>

<text fName1>
/ numitems = 1
/ items = fName1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName2>
/ numitems = 1
/ items = fName2
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName3>
/ numitems = 1
/ items = fName3
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName4>
/ numitems = 1
/ items = fName4
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName5>
/ numitems = 1
/ items = fName5
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName6>
/ numitems = 1
/ items = fName6
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName7>
/ numitems = 1
/ items = fName7
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName8>
/ numitems = 1
/ items = fName8
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName9>
/ numitems = 1
/ items = fName9
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<text fName10>
/ numitems = 1
/ items = fName10
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>

<trial trial_name_11>
/ ontrialbegin = [
    trial.trial_name_11.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName1]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_11.resetStimulusFrames();
    values.respRT = trial.trial_name_11.latency;
    values.word = text.fName1.currentItem]
</trial>

<trial trial_name_12>
/ ontrialbegin = [
    trial.trial_name_12.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName2]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_12.resetStimulusFrames();
    values.respRT = trial.trial_name_12.latency;
    values.word = text.fName2.currentItem]
</trial>

<trial trial_name_13>
/ ontrialbegin = [
    trial.trial_name_13.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName3]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_13.resetStimulusFrames();
    values.respRT = trial.trial_name_13.latency;
    values.word = text.fName3.currentItem]
</trial>

<trial trial_name_14>
/ ontrialbegin = [
    trial.trial_name_14.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName4]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_14.resetStimulusFrames();
    values.respRT = trial.trial_name_14.latency;
    values.word = text.fName4.currentItem]
</trial>

<trial trial_name_15>
/ ontrialbegin = [
    trial.trial_name_15.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName5]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_15.resetStimulusFrames();
    values.respRT = trial.trial_name_15.latency;
    values.word = text.fName5.currentItem]
</trial>

<trial trial_name_16>
/ ontrialbegin = [
    trial.trial_name_16.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName6]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_16.resetStimulusFrames();
    values.respRT = trial.trial_name_16.latency;
    values.word = text.fName6.currentItem]
</trial>

<trial trial_name_17>
/ ontrialbegin = [
    trial.trial_name_17.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName7]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_17.resetStimulusFrames();
    values.respRT = trial.trial_name_17.latency;
    values.word = text.fName7.currentItem]
</trial>

<trial trial_name_18>
/ ontrialbegin = [
    trial.trial_name_18.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName8]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_18.resetStimulusFrames();
    values.respRT = trial.trial_name_18.latency;
    values.word = text.fName8.currentItem]
</trial>

<trial trial_name_19>
/ ontrialbegin = [
    trial.trial_name_19.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName9]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_19.resetStimulusFrames();
    values.respRT = trial.trial_name_19.latency;
    values.word = text.fName9.currentItem]
</trial>

<trial trial_name_20>
/ ontrialbegin = [
    trial.trial_name_20.insertStimulusTime(clearScreen, parameters.stimDuration);    
]
/ stimulustimes = [0 = fName10]
/ validresponse = (parameters.goKey, 0)
/ correctresponse = (parameters.goKey, 0)
/ beginresponsetime = 0
/ responseinterrupt = frames
/ timeout = parameters.responseDuration
/ ontrialend = [
    trial.trial_name_20.resetStimulusFrames();
    values.respRT = trial.trial_name_20.latency;
    values.word = text.fName10.currentItem]
</trial>

<block names_gono>
/ skip = [
    parameters.runPractice == false;
]
/ onblockbegin = [
    values.GoStim = item.friends_catLABEL.item(1); //selects the appropriate label for the practice GO category
    values.NoGoStim = item.nonfriendsNoGo_catLABEL.item(1); //selects the appropriate label for the practice NOGO category
    values.condition = "practice";
]
/ trials = [
    1 = blockInstructions;
    2 = getReady;
    3 = start;
    4-23 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    24-43 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    44-63 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    64-83 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
    84-103 = noreplacenorepeat(trial_name_1, trial_name_2, trial_name_3, trial_name_4, trial_name_5, trial_name_6, trial_name_7, trial_name_8, trial_name_9, trial_name_10, trial_name_11, trial_name_12, trial_name_13, trial_name_14, trial_name_15, trial_name_16, trial_name_17, trial_name_18, trial_name_19, trial_name_20);
        104 = end;
]
/ branch = [if (block.names_gono.totaltrialcount >= 1) block.closeness
]
</block>


<expressions>
/buttoninstruct1 = if (computer.hasKeyboard){
    "place your index finger on the space bar key"
} else {
    "place your index finger over the space bar button"
}
</expressions>

<parameters>
/fixationSize = 10%
/wordSize = 8%

/runPractice = true

/practiceFeedbackDuration = 1000
/getReadyDuration = 5000
/startFixation = 2500
/endFixation = 2000
/stimDuration = 450
/responseDuration = 1200

/goKey = " "
</parameters>

<values>
/index = 1
/iti = 1000

/respRT = 0
/responseCategory = ""

/GoStim = "neutral"
/NoGoStim = ""
/condition = ""
/word = ""
/feedback = 0
</values>

Perhaps you could fix up your code first such that it doesn't throw dozens of unrelated errors

Hi Dave,
Apologies, there are multiple tasks in this script, so I just copied the relevant ones, but in doing so, created new errors. I'm attaching the complete file here. This code runs error-free on my device.

This makes no sense.

<text fName1>
/ numitems = 1
/ items = fName1
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>


The <item> elements referenced are empty -- and they remain empty, since you do nothing at all to fill them with anything.

<item fName1>
</item>

<item fName2>
</item>

<item fName3>
</item>

<item fName4>
</item>
...


If you want <text fName1> to display whatever name values.fName1 was set to, you simply do:

<text fName1>
/ items = ("<%values.fName1%>")
/ select = noreplace
/ fontstyle = ("Arial", parameters.wordSize, true, false, false, false, 5, 1)
/ size = (80%, parameters.wordSize*2)
/ erase = false
/ vjustify = center
</text>




Thanks Dave. I just tried this, and it worked great. Wouldn't have caught it myself. You're so amazing!!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search