## Nested lists, random choice of 3 words horizontally

 Author Message erzsebet  Associate Member         Group: Forum Members Posts: 9, Visits: 44 Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt) Dave  Supreme Being         Group: Administrators Posts: 9.5K, Visits: 43K +xerzsebet - Saturday, April 20, 2019Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt)If you want to have a stimulus item broken up across several lines, you need to specify the element's /size and then you can insert line breaks:/ items = exampleitems/ size = (25%, 20%)/ 1 = "A~nB~nC"/ 2 = "D~nE~nF" erzsebet  Associate Member         Group: Forum Members Posts: 9, Visits: 44 +xDave - Monday, April 22, 2019+xerzsebet - Saturday, April 20, 2019Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt)If you want to have a stimulus item broken up across several lines, you need to specify the element's /size and then you can insert line breaks:/ items = exampleitems/ size = (25%, 20%)/ 1 = "A~nB~nC"/ 2 = "D~nE~nF"Dear Dave,It seems that I did not explain my problem clearly enough.I would like to show three-s of words horizontally. The answerer should click on one of three keys, according to the position of the word on the screen, but only one is correct.If the leftside word is the correct choice, the answerer shoud press "b", if the word on the right side is the correct choice the answere should press "j", and "h" for the middle word.Is it possible to randomize the order of three horizontal words shown at the same time, and getting the correct answer by key-press?/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Thank you for your help,Erzsebet Dave  Supreme Being         Group: Administrators Posts: 9.5K, Visits: 43K +xerzsebet - Tuesday, April 23, 2019+xDave - Monday, April 22, 2019+xerzsebet - Saturday, April 20, 2019Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt)If you want to have a stimulus item broken up across several lines, you need to specify the element's /size and then you can insert line breaks:/ items = exampleitems/ size = (25%, 20%)/ 1 = "A~nB~nC"/ 2 = "D~nE~nF"Dear Dave,It seems that I did not explain my problem clearly enough.I would like to show three-s of words horizontally. The answerer should click on one of three keys, according to the position of the word on the screen, but only one is correct.If the leftside word is the correct choice, the answerer shoud press "b", if the word on the right side is the correct choice the answere should press "j", and "h" for the middle word.Is it possible to randomize the order of three horizontal words shown at the same time, and getting the correct answer by key-press?/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Thank you for your help,ErzsebetYes, I have answered that question in the thread where you posted that question, here: https://www.millisecond.com/forums/FindPost26834.aspx erzsebet  Associate Member         Group: Forum Members Posts: 9, Visits: 44 +xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Monday, April 22, 2019+xerzsebet - Saturday, April 20, 2019Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt)If you want to have a stimulus item broken up across several lines, you need to specify the element's /size and then you can insert line breaks:/ items = exampleitems/ size = (25%, 20%)/ 1 = "A~nB~nC"/ 2 = "D~nE~nF"Dear Dave,It seems that I did not explain my problem clearly enough.I would like to show three-s of words horizontally. The answerer should click on one of three keys, according to the position of the word on the screen, but only one is correct.If the leftside word is the correct choice, the answerer shoud press "b", if the word on the right side is the correct choice the answere should press "j", and "h" for the middle word.Is it possible to randomize the order of three horizontal words shown at the same time, and getting the correct answer by key-press?/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Thank you for your help,ErzsebetYes, I have answered that question in the thread where you posted that question, here: https://www.millisecond.com/forums/FindPost26834.aspxDear Dave,After your answer I am able to assign the correct answers, if there is no randomization inside the items,But I still do not understand whether I can do any randomization between the three words shown horizontally together at the same time.For example  item /1 "Aa Ac Ab" or "Ac Ab Aa" or Ab Ac Aa" or "Aa Ab Ac" or" Ac Aa Ab" or "Ab Aa Ac" , and similarly with /items 2-5/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Can I show the three A-s (and the three B-s, and the three C-s...) in a horizontal line in a randomized order?Thank you for your help,Erzsebet Dave  Supreme Being         Group: Administrators Posts: 9.5K, Visits: 43K +xerzsebet - Tuesday, April 23, 2019+xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Monday, April 22, 2019+xerzsebet - Saturday, April 20, 2019Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt)If you want to have a stimulus item broken up across several lines, you need to specify the element's /size and then you can insert line breaks:/ items = exampleitems/ size = (25%, 20%)/ 1 = "A~nB~nC"/ 2 = "D~nE~nF"Dear Dave,It seems that I did not explain my problem clearly enough.I would like to show three-s of words horizontally. The answerer should click on one of three keys, according to the position of the word on the screen, but only one is correct.If the leftside word is the correct choice, the answerer shoud press "b", if the word on the right side is the correct choice the answere should press "j", and "h" for the middle word.Is it possible to randomize the order of three horizontal words shown at the same time, and getting the correct answer by key-press?/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Thank you for your help,ErzsebetYes, I have answered that question in the thread where you posted that question, here: https://www.millisecond.com/forums/FindPost26834.aspxDear Dave,After your answer I am able to assign the correct answers, if there is no randomization inside the items,But I still do not understand whether I can do any randomization between the three words shown horizontally together at the same time.For example  item /1 "Aa Ac Ab" or "Ac Ab Aa" or Ab Ac Aa" or "Aa Ab Ac" or" Ac Aa Ab" or "Ab Aa Ac" , and similarly with /items 2-5/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Can I show the three A-s (and the three B-s, and the three C-s...) in a horizontal line in a randomized order?Thank you for your help,ErzsebetYou can randomize them, but you cannot do so when you have them in a single element displayed by a single element. What you need is three elements, and then randomize the three text elements' hoizontal position:/ targetx = 0%/ distractor1x = 0%/ distractor2x = 0%/ trials = [1-3 = mytrial]/ ontrialbegin = [values.targetx = list.x.nextvalue;values.distractor1x = list.x.nextvalue;values.distractor2x = list.x.nextvalue;]/ stimulusframes = [1=target, distractor1, distractor2]/ inputdevice = mouse/ validresponse = (target, distractor1, distractor2)/ items = (40%, 50%, 60%)/ selectionrate = always / items = targetitems/ vposition = 50%/ hposition = values.targetx/ select = noreplace/ items = distractor1items/ vposition = 50%/ hposition = values.distractor1x/ select = text.target.currentitemnumber/ items = distractor2items/ vposition = 50%/ hposition = values.distractor2x/ select = text.target.currentitemnumber/ 1 = "Target A"/ 2 = "Target B"/ 3 = "Target C"/ 1 = "Distractor1 A"/ 2 = "Distractor1 B"/ 3 = "Distractor1 C"/ 1 = "Distractor2 A"/ 2 = "Distractor2 B"/ 3 = "Distractor2 C" erzsebet  Associate Member         Group: Forum Members Posts: 9, Visits: 44 +xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Monday, April 22, 2019+xerzsebet - Saturday, April 20, 2019Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt)If you want to have a stimulus item broken up across several lines, you need to specify the element's /size and then you can insert line breaks:/ items = exampleitems/ size = (25%, 20%)/ 1 = "A~nB~nC"/ 2 = "D~nE~nF"Dear Dave,It seems that I did not explain my problem clearly enough.I would like to show three-s of words horizontally. The answerer should click on one of three keys, according to the position of the word on the screen, but only one is correct.If the leftside word is the correct choice, the answerer shoud press "b", if the word on the right side is the correct choice the answere should press "j", and "h" for the middle word.Is it possible to randomize the order of three horizontal words shown at the same time, and getting the correct answer by key-press?/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Thank you for your help,ErzsebetYes, I have answered that question in the thread where you posted that question, here: https://www.millisecond.com/forums/FindPost26834.aspxDear Dave,After your answer I am able to assign the correct answers, if there is no randomization inside the items,But I still do not understand whether I can do any randomization between the three words shown horizontally together at the same time.For example  item /1 "Aa Ac Ab" or "Ac Ab Aa" or Ab Ac Aa" or "Aa Ab Ac" or" Ac Aa Ab" or "Ab Aa Ac" , and similarly with /items 2-5/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Can I show the three A-s (and the three B-s, and the three C-s...) in a horizontal line in a randomized order?Thank you for your help,ErzsebetYou can randomize them, but you cannot do so when you have them in a single element displayed by a single element. What you need is three elements, and then randomize the three text elements' hoizontal position:/ targetx = 0%/ distractor1x = 0%/ distractor2x = 0%/ trials = [1-3 = mytrial]/ ontrialbegin = [values.targetx = list.x.nextvalue;values.distractor1x = list.x.nextvalue;values.distractor2x = list.x.nextvalue;]/ stimulusframes = [1=target, distractor1, distractor2]/ inputdevice = mouse/ validresponse = (target, distractor1, distractor2)/ items = (40%, 50%, 60%)/ selectionrate = always / items = targetitems/ vposition = 50%/ hposition = values.targetx/ select = noreplace/ items = distractor1items/ vposition = 50%/ hposition = values.distractor1x/ select = text.target.currentitemnumber/ items = distractor2items/ vposition = 50%/ hposition = values.distractor2x/ select = text.target.currentitemnumber/ 1 = "Target A"/ 2 = "Target B"/ 3 = "Target C"/ 1 = "Distractor1 A"/ 2 = "Distractor1 B"/ 3 = "Distractor1 C"/ 1 = "Distractor2 A"/ 2 = "Distractor2 B"/ 3 = "Distractor2 C"Thank you, Dave,the randomizations work.But I still have one problem left:If I use the mouse as an input device I can add " / iscorrectresponse = [target] " and the correct answer will be recorded.However, if I use the keyboard as the input device and pressing certain keys (2,3,4 as standing for "'1","2","3") indicate the position of the target I do not know how to define the correct answer.Can you help me with this problem too?Thank you!Erzsebet Dave  Supreme Being         Group: Administrators Posts: 9.5K, Visits: 43K +xerzsebet - Tuesday, April 23, 2019+xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Monday, April 22, 2019+xerzsebet - Saturday, April 20, 2019Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt)If you want to have a stimulus item broken up across several lines, you need to specify the element's /size and then you can insert line breaks:/ items = exampleitems/ size = (25%, 20%)/ 1 = "A~nB~nC"/ 2 = "D~nE~nF"Dear Dave,It seems that I did not explain my problem clearly enough.I would like to show three-s of words horizontally. The answerer should click on one of three keys, according to the position of the word on the screen, but only one is correct.If the leftside word is the correct choice, the answerer shoud press "b", if the word on the right side is the correct choice the answere should press "j", and "h" for the middle word.Is it possible to randomize the order of three horizontal words shown at the same time, and getting the correct answer by key-press?/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Thank you for your help,ErzsebetYes, I have answered that question in the thread where you posted that question, here: https://www.millisecond.com/forums/FindPost26834.aspxDear Dave,After your answer I am able to assign the correct answers, if there is no randomization inside the items,But I still do not understand whether I can do any randomization between the three words shown horizontally together at the same time.For example  item /1 "Aa Ac Ab" or "Ac Ab Aa" or Ab Ac Aa" or "Aa Ab Ac" or" Ac Aa Ab" or "Ab Aa Ac" , and similarly with /items 2-5/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Can I show the three A-s (and the three B-s, and the three C-s...) in a horizontal line in a randomized order?Thank you for your help,ErzsebetYou can randomize them, but you cannot do so when you have them in a single element displayed by a single element. What you need is three elements, and then randomize the three text elements' hoizontal position:/ targetx = 0%/ distractor1x = 0%/ distractor2x = 0%/ trials = [1-3 = mytrial]/ ontrialbegin = [values.targetx = list.x.nextvalue;values.distractor1x = list.x.nextvalue;values.distractor2x = list.x.nextvalue;]/ stimulusframes = [1=target, distractor1, distractor2]/ inputdevice = mouse/ validresponse = (target, distractor1, distractor2)/ items = (40%, 50%, 60%)/ selectionrate = always / items = targetitems/ vposition = 50%/ hposition = values.targetx/ select = noreplace/ items = distractor1items/ vposition = 50%/ hposition = values.distractor1x/ select = text.target.currentitemnumber/ items = distractor2items/ vposition = 50%/ hposition = values.distractor2x/ select = text.target.currentitemnumber/ 1 = "Target A"/ 2 = "Target B"/ 3 = "Target C"/ 1 = "Distractor1 A"/ 2 = "Distractor1 B"/ 3 = "Distractor1 C"/ 1 = "Distractor2 A"/ 2 = "Distractor2 B"/ 3 = "Distractor2 C"Thank you, Dave,the randomizations work.But I still have one problem left:If I use the mouse as an input device I can add " / iscorrectresponse = [target] " and the correct answer will be recorded.However, if I use the keyboard as the input device and pressing certain keys (2,3,4 as standing for "'1","2","3") indicate the position of the target I do not know how to define the correct answer.Can you help me with this problem too?Thank you!ErzsebetThis too can easily be done per /iscorrectresponse:/ targetx = 0%/ distractor1x = 0%/ distractor2x = 0%/ trials = [1-3 = mytrial]/ ontrialbegin = [values.targetx = list.x.nextvalue;values.distractor1x = list.x.nextvalue;values.distractor2x = list.x.nextvalue;]/ stimulusframes = [1=target, distractor1, distractor2]/ inputdevice = keyboard/ validresponse = (2,3,4)/ iscorrectresponse = [(values.targetx == 40% && trial.mytrial.response == 2) || (values.targetx == 50% && trial.mytrial.response == 3) ||(values.targetx == 60% && trial.mytrial.response == 4)]/ correctmessage = true(cmsg,1000)/ errormessage = true(emsg, 1000)/ items = (40%, 50%, 60%)/ selectionrate = always / items = targetitems/ vposition = 50%/ hposition = values.targetx/ select = noreplace/ items = distractor1items/ vposition = 50%/ hposition = values.distractor1x/ select = text.target.currentitemnumber/ items = distractor2items/ vposition = 50%/ hposition = values.distractor2x/ select = text.target.currentitemnumber/ 1 = "Target A"/ 2 = "Target B"/ 3 = "Target C"/ 1 = "Distractor1 A"/ 2 = "Distractor1 B"/ 3 = "Distractor1 C"/ 1 = "Distractor2 A"/ 2 = "Distractor2 B"/ 3 = "Distractor2 C"/ items = ("CORRECT")/ txcolor = green/ position = (50%, 75%)/ items = ("ERROR")/ txcolor = red/ position = (50%, 75%) erzsebet  Associate Member         Group: Forum Members Posts: 9, Visits: 44 +xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Tuesday, April 23, 2019+xerzsebet - Tuesday, April 23, 2019+xDave - Monday, April 22, 2019+xerzsebet - Saturday, April 20, 2019Hello,I've tried writing a simple script, but I couldn't solve my problem:There are two parts of my test.In the first part I would like to show three words ("triplets") together, horizontally, thirty times. These words should appear in a random order, horizontally, The odd one (according to the instructions in the beginning of the first part) should be chosen, by clicking on b, h, or j.There are thirty word-triplets, they should come after each other, in a random order.In the second part I would like to show the same word-triplets, always  in a random order horizontally, and, additionally, all thirty of them randomly after each other. The odd one (according to the instructions in the beginning of the second part) should be chosen, by clicking on b, h, or j.I managed to write something like this, but I cannot figure out how to write the three words inside the triplets randomly horizontally.Can you help me?Thank you,Erzsebet*************************************************Creating Text Stimuli*************************************************/ items = firstwordtriplets/ 1 = "  repülő   seregély  elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs  körte   golyó    " / items = secondwordtriplets/ 1 = "  repülő   seregély   elefánt   "/ 2 = "  sapka   harang   kendő    "/ 3 = "  narancs   körte   golyó    " / items = ("press B if the left word is the odd one out")/ position = (25, 75)/ txcolor = (0, 0, 255) / items = ("press H if the middle word is the odd one out")/ position = (50, 75)/ txcolor = (0, 0, 255) / items = ("press J if the right word is the odd one out")/ position = (75, 75)/ txcolor = (0, 0, 255)*************************************************Creating Instructions************************************************* ^^^^^^^^Odd one out3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^First part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue^^^^^^^^^^Second part, which is the less similar in color?3 fingers B and H and J, B left, J right, H middle word,^^^^^^^^^^press "H" to continue ^^^^^^      end^^^^^^^^    thank you/ nextkey = ("h")*************************************************Creating Trials************************************************* / validresponse = ("b", "h", "j")/ stimulusframes = [1=firstwordtriplets] / validresponse = ("b", "h", "j")/ stimulusframes = [1=secondwordtriplets]*************************************************Creating Blocks*************************************************/ trials = [1-3 = noreplace(firstwordtriplets)]/ preinstructions = (first)/ bgstim = (bkey, jkey, hkey)/ trials = [1-3 = noreplace(secondwordtriplets)]/ preinstructions = (second)/ bgstim = (bkey, jkey, hkey)*************************************************Creating an Expt*************************************************/ preinstructions = (intro)/ postinstructions = (end)/ blocks = [1=first; 2=second]/ screencolor = (175, 175, 255)/ fontstyle = ("Courier New", 14pt)If you want to have a stimulus item broken up across several lines, you need to specify the element's /size and then you can insert line breaks:/ items = exampleitems/ size = (25%, 20%)/ 1 = "A~nB~nC"/ 2 = "D~nE~nF"Dear Dave,It seems that I did not explain my problem clearly enough.I would like to show three-s of words horizontally. The answerer should click on one of three keys, according to the position of the word on the screen, but only one is correct.If the leftside word is the correct choice, the answerer shoud press "b", if the word on the right side is the correct choice the answere should press "j", and "h" for the middle word.Is it possible to randomize the order of three horizontal words shown at the same time, and getting the correct answer by key-press?/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Thank you for your help,ErzsebetYes, I have answered that question in the thread where you posted that question, here: https://www.millisecond.com/forums/FindPost26834.aspxDear Dave,After your answer I am able to assign the correct answers, if there is no randomization inside the items,But I still do not understand whether I can do any randomization between the three words shown horizontally together at the same time.For example  item /1 "Aa Ac Ab" or "Ac Ab Aa" or Ab Ac Aa" or "Aa Ab Ac" or" Ac Aa Ab" or "Ab Aa Ac" , and similarly with /items 2-5/ items = firstwordtriplets/ 1 = "  Aa   Ab  Ac   "/ 2 = "  Ba  Bb   Bc   "/ 3 = "  Cc  Cb  Cc   "/ 4 = "  Da  Db   Dc   "/ 5 = "  Ea  Eb    Ec  "Can I show the three A-s (and the three B-s, and the three C-s...) in a horizontal line in a randomized order?Thank you for your help,ErzsebetYou can randomize them, but you cannot do so when you have them in a single element displayed by a single element. What you need is three elements, and then randomize the three text elements' hoizontal position:/ targetx = 0%/ distractor1x = 0%/ distractor2x = 0%/ trials = [1-3 = mytrial]/ ontrialbegin = [values.targetx = list.x.nextvalue;values.distractor1x = list.x.nextvalue;values.distractor2x = list.x.nextvalue;]/ stimulusframes = [1=target, distractor1, distractor2]/ inputdevice = mouse/ validresponse = (target, distractor1, distractor2)/ items = (40%, 50%, 60%)/ selectionrate = always / items = targetitems/ vposition = 50%/ hposition = values.targetx/ select = noreplace/ items = distractor1items/ vposition = 50%/ hposition = values.distractor1x/ select = text.target.currentitemnumber/ items = distractor2items/ vposition = 50%/ hposition = values.distractor2x/ select = text.target.currentitemnumber/ 1 = "Target A"/ 2 = "Target B"/ 3 = "Target C"/ 1 = "Distractor1 A"/ 2 = "Distractor1 B"/ 3 = "Distractor1 C"/ 1 = "Distractor2 A"/ 2 = "Distractor2 B"/ 3 = "Distractor2 C"Thank you, Dave,the randomizations work.But I still have one problem left:If I use the mouse as an input device I can add " / iscorrectresponse = [target] " and the correct answer will be recorded.However, if I use the keyboard as the input device and pressing certain keys (2,3,4 as standing for "'1","2","3") indicate the position of the target I do not know how to define the correct answer.Can you help me with this problem too?Thank you!ErzsebetThis too can easily be done per /iscorrectresponse:/ targetx = 0%/ distractor1x = 0%/ distractor2x = 0%/ trials = [1-3 = mytrial]/ ontrialbegin = [values.targetx = list.x.nextvalue;values.distractor1x = list.x.nextvalue;values.distractor2x = list.x.nextvalue;]/ stimulusframes = [1=target, distractor1, distractor2]/ inputdevice = keyboard/ validresponse = (2,3,4)/ iscorrectresponse = [(values.targetx == 40% && trial.mytrial.response == 2) || (values.targetx == 50% && trial.mytrial.response == 3) ||(values.targetx == 60% && trial.mytrial.response == 4)]/ correctmessage = true(cmsg,1000)/ errormessage = true(emsg, 1000)/ items = (40%, 50%, 60%)/ selectionrate = always / items = targetitems/ vposition = 50%/ hposition = values.targetx/ select = noreplace/ items = distractor1items/ vposition = 50%/ hposition = values.distractor1x/ select = text.target.currentitemnumber/ items = distractor2items/ vposition = 50%/ hposition = values.distractor2x/ select = text.target.currentitemnumber/ 1 = "Target A"/ 2 = "Target B"/ 3 = "Target C"/ 1 = "Distractor1 A"/ 2 = "Distractor1 B"/ 3 = "Distractor1 C"/ 1 = "Distractor2 A"/ 2 = "Distractor2 B"/ 3 = "Distractor2 C"/ items = ("CORRECT")/ txcolor = green/ position = (50%, 75%)/ items = ("ERROR")/ txcolor = red/ position = (50%, 75%)Thank you!

## Reading This Topic

##### Login
 Existing Account Email Address: Password: Remember Me Social Logins
##### Select a Forum....
 Millisecond Forums      Millisecond Software News      Inquisit 5      Inquisit 4      Inquisit 3      Inquisit 2.0      Inquisit 1.33 (archives)