Millisecond Forums

Select from lists and display

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

By wuaham - 8/27/2020

Dear Inquisit:

I wish to implement an an algorithm as follows:

1. Display a pair of text from 2 different list (e.g list left, list right) (press space bar)
2. Display one of the text (selected in step 1) (press space bar)
3. Display again the text pair (selected in step 1) (press space bar)
4. Repeat step 1-3 over all items in the list (now only 4 in each list, it could be more)

Step-1 is working okay. My problem is in step 2 to step 3 (I cannot think of how to) display the same one text (out of two selected in step-1) and then display the same pair again (Let display location remain same). I would appreciate your support. I have the code as follows:

<values>
/ randNum = 0
/ leftItem = ""
/ rightItem = ""
</values>

<block myblock>
/ trials = [1-4=bothLeftRight]
/ recorddata = false
</block>

<trial bothLeftRight>
/ ontrialbegin = [values.randNum = rand(0,10)]
/ stimulustimes = [0=left, right]
/ validresponse = (57)
/ ontrialend = [values.leftItem = item.left; values.rightItem = item.right]
/ branch=[if (values.randNum < 5) trial.left]
/ branch=[if (values.randNum >= 5) trial.right]
</trial>

<trial left>
/ stimulustimes = [0 = left]
/ validresponse = (57)
</trial>

<trial right>
/ stimulustimes = [0 = right]
/ validresponse = (57)
</trial>

<text left>
/ items = left
/ select = list.left.nextindex
/ position = (40%, 50%)
</text>

<text right>
/ items = right
/ select = list.right.nextindex
/ position = (60%, 50%)
</text>

<item left>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>

<item right>
/ 1 = "E"
/ 2 = "F"
/ 3 = "G"
/ 4 = "H"
</item>

<list left>
/ poolsize = 4
/ selectionrate = always
</list>

<list right>
/ poolsize = 4
/ selectionrate = always
</list>
By Dave - 8/27/2020

wuaham - 8/27/2020
Dear Inquisit:

I wish to implement an an algorithm as follows:

1. Display a pair of text from 2 different list (e.g list left, list right) (press space bar)
2. Display one of the text (selected in step 1) (press space bar)
3. Display again the text pair (selected in step 1) (press space bar)
4. Repeat step 1-3 over all items in the list (now only 4 in each list, it could be more)

Step-1 is working okay. My problem is in step 2 to step 3 (I cannot think of how to) display the same one text (out of two selected in step-1) and then display the same pair again (Let display location remain same). I would appreciate your support. I have the code as follows:

<values>
/ randNum = 0
/ leftItem = ""
/ rightItem = ""
</values>

<block myblock>
/ trials = [1-4=bothLeftRight]
/ recorddata = false
</block>

<trial bothLeftRight>
/ ontrialbegin = [values.randNum = rand(0,10)]
/ stimulustimes = [0=left, right]
/ validresponse = (57)
/ ontrialend = [values.leftItem = item.left; values.rightItem = item.right]
/ branch=[if (values.randNum < 5) trial.left]
/ branch=[if (values.randNum >= 5) trial.right]
</trial>

<trial left>
/ stimulustimes = [0 = left]
/ validresponse = (57)
</trial>

<trial right>
/ stimulustimes = [0 = right]
/ validresponse = (57)
</trial>

<text left>
/ items = left
/ select = list.left.nextindex
/ position = (40%, 50%)
</text>

<text right>
/ items = right
/ select = list.right.nextindex
/ position = (60%, 50%)
</text>

<item left>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>

<item right>
/ 1 = "E"
/ 2 = "F"
/ 3 = "G"
/ 4 = "H"
</item>

<list left>
/ poolsize = 4
/ selectionrate = always
</list>

<list right>
/ poolsize = 4
/ selectionrate = always
</list>

<values>
/ randNum = 0
/ leftItem = ""
/ rightItem = ""
/ leftItemNumber = 0
/ rightItemNumber = 0
</values>

<block myblock>
/ trials = [1-4=bothLeftRight]
/ recorddata = false
</block>

<trial bothLeftRight>
/ ontrialbegin = [values.randNum = rand(0,10)]
/ ontrialbegin = [
    values.leftItemNumber = list.left.nextindex;
    values.rightItemNumber = list.right.nextindex;
]
/ stimulustimes = [0=left, right]
/ validresponse = (57)
/ ontrialend = [values.leftItem = text.left.currentitem; values.rightItem = text.right.currentitem]
/ branch=[if (values.randNum < 5) trial.left]
/ branch=[if (values.randNum >= 5) trial.right]
</trial>

<trial left>
/ stimulustimes = [0 = left]
/ validresponse = (57)
/ branch = [
    trial.bothLeftRight2;
]
</trial>

<trial right>
/ stimulustimes = [0 = right]
/ validresponse = (57)
/ branch = [
    trial.bothLeftRight2;
]
</trial>

<trial bothLeftRight2>
/ stimulustimes = [0=left, right]
/ validresponse = (57)
</trial>

<text left>
/ items = left
/ select = values.leftItemNumber
/ position = (40%, 50%)
</text>

<text right>
/ items = right
/ select = values.rightItemNumber
/ position = (60%, 50%)
</text>

<item left>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>

<item right>
/ 1 = "E"
/ 2 = "F"
/ 3 = "G"
/ 4 = "H"
</item>

<list left>
/ poolsize = 4
/ selectionrate = always
</list>

<list right>
/ poolsize = 4
/ selectionrate = always
</list>
By wuaham - 8/27/2020

Dave - 8/27/2020
wuaham - 8/27/2020
Dear Inquisit:

I wish to implement an an algorithm as follows:

1. Display a pair of text from 2 different list (e.g list left, list right) (press space bar)
2. Display one of the text (selected in step 1) (press space bar)
3. Display again the text pair (selected in step 1) (press space bar)
4. Repeat step 1-3 over all items in the list (now only 4 in each list, it could be more)

Step-1 is working okay. My problem is in step 2 to step 3 (I cannot think of how to) display the same one text (out of two selected in step-1) and then display the same pair again (Let display location remain same). I would appreciate your support. I have the code as follows:

<values>
/ randNum = 0
/ leftItem = ""
/ rightItem = ""
</values>

<block myblock>
/ trials = [1-4=bothLeftRight]
/ recorddata = false
</block>

<trial bothLeftRight>
/ ontrialbegin = [values.randNum = rand(0,10)]
/ stimulustimes = [0=left, right]
/ validresponse = (57)
/ ontrialend = [values.leftItem = item.left; values.rightItem = item.right]
/ branch=[if (values.randNum < 5) trial.left]
/ branch=[if (values.randNum >= 5) trial.right]
</trial>

<trial left>
/ stimulustimes = [0 = left]
/ validresponse = (57)
</trial>

<trial right>
/ stimulustimes = [0 = right]
/ validresponse = (57)
</trial>

<text left>
/ items = left
/ select = list.left.nextindex
/ position = (40%, 50%)
</text>

<text right>
/ items = right
/ select = list.right.nextindex
/ position = (60%, 50%)
</text>

<item left>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>

<item right>
/ 1 = "E"
/ 2 = "F"
/ 3 = "G"
/ 4 = "H"
</item>

<list left>
/ poolsize = 4
/ selectionrate = always
</list>

<list right>
/ poolsize = 4
/ selectionrate = always
</list>

<values>
/ randNum = 0
/ leftItem = ""
/ rightItem = ""
/ leftItemNumber = 0
/ rightItemNumber = 0
</values>

<block myblock>
/ trials = [1-4=bothLeftRight]
/ recorddata = false
</block>

<trial bothLeftRight>
/ ontrialbegin = [values.randNum = rand(0,10)]
/ ontrialbegin = [
    values.leftItemNumber = list.left.nextindex;
    values.rightItemNumber = list.right.nextindex;
]
/ stimulustimes = [0=left, right]
/ validresponse = (57)
/ ontrialend = [values.leftItem = text.left.currentitem; values.rightItem = text.right.currentitem]
/ branch=[if (values.randNum < 5) trial.left]
/ branch=[if (values.randNum >= 5) trial.right]
</trial>

<trial left>
/ stimulustimes = [0 = left]
/ validresponse = (57)
/ branch = [
    trial.bothLeftRight2;
]
</trial>

<trial right>
/ stimulustimes = [0 = right]
/ validresponse = (57)
/ branch = [
    trial.bothLeftRight2;
]
</trial>

<trial bothLeftRight2>
/ stimulustimes = [0=left, right]
/ validresponse = (57)
</trial>

<text left>
/ items = left
/ select = values.leftItemNumber
/ position = (40%, 50%)
</text>

<text right>
/ items = right
/ select = values.rightItemNumber
/ position = (60%, 50%)
</text>

<item left>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>

<item right>
/ 1 = "E"
/ 2 = "F"
/ 3 = "G"
/ 4 = "H"
</item>

<list left>
/ poolsize = 4
/ selectionrate = always
</list>

<list right>
/ poolsize = 4
/ selectionrate = always
</list>

Excellent  Dave - it works!!!