Millisecond Forums

How to randomize outside of an ?

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

By uni-student92084 - 1/17/2020

Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  
By Dave - 1/17/2020

Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.
By uni-student92084 - 1/19/2020

Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 
By Dave - 1/19/2020

Kksham052 - 1/19/2020
Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 

You can have a trial set up a random stimulus presentation sequence by using a <list> with the stimulus elements in it and using the insertstimulustime() function.

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
    ...;
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
...
</trial>

<list stimuli>
/ items = (text.demplus_1, text.demplus_2, ..., text.repplus_1, text.repplus_2, ..., text.demminus_1, text.demminus_2, ..., text.repminus_1, text.repminus_1, ...)
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

//dem plus
<text demplus_1>
...
</text>

<text demplus_2>
...
</text>
...

// rep plus
<text repplus_1>
...
</text>

<text repplus_2>
...
</text>
...

// dem minus
<text demminus_1>
...
</text>

<text demminus_2>
...
</text>
...

// rep minus
<text repminus_1>
...
</text>

<text repminus_2>
...
</text>
...


By uni-student92084 - 1/23/2020

Dave - 1/20/2020
Kksham052 - 1/19/2020
Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 

You can have a trial set up a random stimulus presentation sequence by using a <list> with the stimulus elements in it and using the insertstimulustime() function.

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
    ...;
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
...
</trial>

<list stimuli>
/ items = (text.demplus_1, text.demplus_2, ..., text.repplus_1, text.repplus_2, ..., text.demminus_1, text.demminus_2, ..., text.repminus_1, text.repminus_1, ...)
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

//dem plus
<text demplus_1>
...
</text>

<text demplus_2>
...
</text>
...

// rep plus
<text repplus_1>
...
</text>

<text repplus_2>
...
</text>
...

// dem minus
<text demminus_1>
...
</text>

<text demminus_2>
...
</text>
...

// rep minus
<text repminus_1>
...
</text>

<text repminus_2>
...
</text>
...



Hi Dave,
Thank you for your response. Sorry, my response is late but I just have one question about your response. What is the purpose of the this portion of the script and why are we using it with the <list> function?: 
<trial example>
/ ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
  ...;
]
/ ontrialend = [
  trial.example.resetstimulusframes();
]
...
</trial>
By Dave - 1/23/2020

Kksham052 - 1/24/2020
Dave - 1/20/2020
Kksham052 - 1/19/2020
Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 

You can have a trial set up a random stimulus presentation sequence by using a <list> with the stimulus elements in it and using the insertstimulustime() function.

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
    ...;
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
...
</trial>

<list stimuli>
/ items = (text.demplus_1, text.demplus_2, ..., text.repplus_1, text.repplus_2, ..., text.demminus_1, text.demminus_2, ..., text.repminus_1, text.repminus_1, ...)
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

//dem plus
<text demplus_1>
...
</text>

<text demplus_2>
...
</text>
...

// rep plus
<text repplus_1>
...
</text>

<text repplus_2>
...
</text>
...

// dem minus
<text demminus_1>
...
</text>

<text demminus_2>
...
</text>
...

// rep minus
<text repminus_1>
...
</text>

<text repminus_2>
...
</text>
...



Hi Dave,
Thank you for your response. Sorry, my response is late but I just have one question about your response. What is the purpose of the this portion of the script and why are we using it with the <list> function?: 
<trial example>
/ ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
  ...;
]
/ ontrialend = [
  trial.example.resetstimulusframes();
]
...
</trial>

The text elements are the list's items. Items -- that is text elements -- are sample randomly from the list at the start of the trial and inserted into the stimulus presentation sequence.
By Dave - 1/23/2020

Dave - 1/24/2020
Kksham052 - 1/24/2020
Dave - 1/20/2020
Kksham052 - 1/19/2020
Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 

You can have a trial set up a random stimulus presentation sequence by using a <list> with the stimulus elements in it and using the insertstimulustime() function.

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
    ...;
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
...
</trial>

<list stimuli>
/ items = (text.demplus_1, text.demplus_2, ..., text.repplus_1, text.repplus_2, ..., text.demminus_1, text.demminus_2, ..., text.repminus_1, text.repminus_1, ...)
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

//dem plus
<text demplus_1>
...
</text>

<text demplus_2>
...
</text>
...

// rep plus
<text repplus_1>
...
</text>

<text repplus_2>
...
</text>
...

// dem minus
<text demminus_1>
...
</text>

<text demminus_2>
...
</text>
...

// rep minus
<text repminus_1>
...
</text>

<text repminus_2>
...
</text>
...



Hi Dave,
Thank you for your response. Sorry, my response is late but I just have one question about your response. What is the purpose of the this portion of the script and why are we using it with the <list> function?: 
<trial example>
/ ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
  ...;
]
/ ontrialend = [
  trial.example.resetstimulusframes();
]
...
</trial>

The text elements are the list's items. Items -- that is text elements -- are sample randomly from the list at the start of the trial and inserted into the stimulus presentation sequence.

Here's a simple example. Suppose you have three text elements A, B, C. You want to display them 1000ms apart in a trial, but you want them in random order, so *not* always A->B->C, but sometimes B->C->A or A->C->B etc.

<block myblock>
/ trials = [1-10 = example]
</block>

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
/ validresponse = (57)
/ posttrialpause = 500
</trial>

<list stimuli>
/ items = (text.a, text.b, text.c)
/ selectionmode = random
/ replace = false
/ selectionrate = always
</list>

<text a>
/ items = ("A")
/ size = (5%,5%)
</text>

<text b>
/ items = ("B")
/ size = (5%,5%)
</text>

<text c>
/ items = ("C")
/ size = (5%,5%)
</text>

By uni-student92084 - 1/24/2020

Dave - 1/24/2020
Dave - 1/24/2020
Kksham052 - 1/24/2020
Dave - 1/20/2020
Kksham052 - 1/19/2020
Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 

You can have a trial set up a random stimulus presentation sequence by using a <list> with the stimulus elements in it and using the insertstimulustime() function.

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
    ...;
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
...
</trial>

<list stimuli>
/ items = (text.demplus_1, text.demplus_2, ..., text.repplus_1, text.repplus_2, ..., text.demminus_1, text.demminus_2, ..., text.repminus_1, text.repminus_1, ...)
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

//dem plus
<text demplus_1>
...
</text>

<text demplus_2>
...
</text>
...

// rep plus
<text repplus_1>
...
</text>

<text repplus_2>
...
</text>
...

// dem minus
<text demminus_1>
...
</text>

<text demminus_2>
...
</text>
...

// rep minus
<text repminus_1>
...
</text>

<text repminus_2>
...
</text>
...



Hi Dave,
Thank you for your response. Sorry, my response is late but I just have one question about your response. What is the purpose of the this portion of the script and why are we using it with the <list> function?: 
<trial example>
/ ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
  ...;
]
/ ontrialend = [
  trial.example.resetstimulusframes();
]
...
</trial>

The text elements are the list's items. Items -- that is text elements -- are sample randomly from the list at the start of the trial and inserted into the stimulus presentation sequence.

Here's a simple example. Suppose you have three text elements A, B, C. You want to display them 1000ms apart in a trial, but you want them in random order, so *not* always A->B->C, but sometimes B->C->A or A->C->B etc.

<block myblock>
/ trials = [1-10 = example]
</block>

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
/ validresponse = (57)
/ posttrialpause = 500
</trial>

<list stimuli>
/ items = (text.a, text.b, text.c)
/ selectionmode = random
/ replace = false
/ selectionrate = always
</list>

<text a>
/ items = ("A")
/ size = (5%,5%)
</text>

<text b>
/ items = ("B")
/ size = (5%,5%)
</text>

<text c>
/ items = ("C")
/ size = (5%,5%)
</text>


Okay, I understand. So this is my script now, does this look correct? I would like my <texts> to refer to the specific items. So, if the text PolADem1G was run, I'd like the scores in PolADem1G's item to randomly appear on the screen. Please let me know if this will work. Thank you!

<item PolADem1G>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolADem2B>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolARep1G>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolARep2B>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>


<text PolADem1G>
/items = PolADem1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>



<text PolADem2B>
/items = PolADem1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<text PolARep1G>
/items = PolARep1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<text PolARep2B>
/items = PolARep2B
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<list stimuli>
/items= (text.PolADem1G, text.PolADem2B, text.PolARep1G,
text.PolARep2B)
/selectionrate =always
/selectionmode =random
/replace = false
</list>

<trial example>
/ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);]
/ontrialend= [trial.example.resetstimulusframes()]
</trial>

By Dave - 1/24/2020

Kksham052 - 1/24/2020
Dave - 1/24/2020
Dave - 1/24/2020
Kksham052 - 1/24/2020
Dave - 1/20/2020
Kksham052 - 1/19/2020
Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 

You can have a trial set up a random stimulus presentation sequence by using a <list> with the stimulus elements in it and using the insertstimulustime() function.

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
    ...;
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
...
</trial>

<list stimuli>
/ items = (text.demplus_1, text.demplus_2, ..., text.repplus_1, text.repplus_2, ..., text.demminus_1, text.demminus_2, ..., text.repminus_1, text.repminus_1, ...)
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

//dem plus
<text demplus_1>
...
</text>

<text demplus_2>
...
</text>
...

// rep plus
<text repplus_1>
...
</text>

<text repplus_2>
...
</text>
...

// dem minus
<text demminus_1>
...
</text>

<text demminus_2>
...
</text>
...

// rep minus
<text repminus_1>
...
</text>

<text repminus_2>
...
</text>
...



Hi Dave,
Thank you for your response. Sorry, my response is late but I just have one question about your response. What is the purpose of the this portion of the script and why are we using it with the <list> function?: 
<trial example>
/ ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
  ...;
]
/ ontrialend = [
  trial.example.resetstimulusframes();
]
...
</trial>

The text elements are the list's items. Items -- that is text elements -- are sample randomly from the list at the start of the trial and inserted into the stimulus presentation sequence.

Here's a simple example. Suppose you have three text elements A, B, C. You want to display them 1000ms apart in a trial, but you want them in random order, so *not* always A->B->C, but sometimes B->C->A or A->C->B etc.

<block myblock>
/ trials = [1-10 = example]
</block>

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
/ validresponse = (57)
/ posttrialpause = 500
</trial>

<list stimuli>
/ items = (text.a, text.b, text.c)
/ selectionmode = random
/ replace = false
/ selectionrate = always
</list>

<text a>
/ items = ("A")
/ size = (5%,5%)
</text>

<text b>
/ items = ("B")
/ size = (5%,5%)
</text>

<text c>
/ items = ("C")
/ size = (5%,5%)
</text>


Okay, I understand. So this is my script now, does this look correct? I would like my <texts> to refer to the specific items. So, if the text PolADem1G was run, I'd like the scores in PolADem1G's item to randomly appear on the screen. Please let me know if this will work. Thank you!

<item PolADem1G>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolADem2B>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolARep1G>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolARep2B>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>


<text PolADem1G>
/items = PolADem1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>



<text PolADem2B>
/items = PolADem1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<text PolARep1G>
/items = PolARep1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<text PolARep2B>
/items = PolARep2B
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<list stimuli>
/items= (text.PolADem1G, text.PolADem2B, text.PolARep1G,
text.PolARep2B)
/selectionrate =always
/selectionmode =random
/replace = false
</list>

<trial example>
/ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);]
/ontrialend= [trial.example.resetstimulusframes()]
</trial>


Well, no. As I've explained previously (here: https://www.millisecond.com/forums/Topic28105.aspx ), a given <text> element will only select a single item per trial. So, if you want to sample multiple different PolADem1G scores, you need (a) more <text> elements and (b) use <list>s for the item selection in those <text> elements.

This is in addition to randomly setting up the stimulus presentation sequence as explained in this thread here.
By uni-student92084 - 1/24/2020

Dave - 1/24/2020
Kksham052 - 1/24/2020
Dave - 1/24/2020
Dave - 1/24/2020
Kksham052 - 1/24/2020
Dave - 1/20/2020
Kksham052 - 1/19/2020
Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 

You can have a trial set up a random stimulus presentation sequence by using a <list> with the stimulus elements in it and using the insertstimulustime() function.

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
    ...;
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
...
</trial>

<list stimuli>
/ items = (text.demplus_1, text.demplus_2, ..., text.repplus_1, text.repplus_2, ..., text.demminus_1, text.demminus_2, ..., text.repminus_1, text.repminus_1, ...)
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

//dem plus
<text demplus_1>
...
</text>

<text demplus_2>
...
</text>
...

// rep plus
<text repplus_1>
...
</text>

<text repplus_2>
...
</text>
...

// dem minus
<text demminus_1>
...
</text>

<text demminus_2>
...
</text>
...

// rep minus
<text repminus_1>
...
</text>

<text repminus_2>
...
</text>
...



Hi Dave,
Thank you for your response. Sorry, my response is late but I just have one question about your response. What is the purpose of the this portion of the script and why are we using it with the <list> function?: 
<trial example>
/ ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
  ...;
]
/ ontrialend = [
  trial.example.resetstimulusframes();
]
...
</trial>

The text elements are the list's items. Items -- that is text elements -- are sample randomly from the list at the start of the trial and inserted into the stimulus presentation sequence.

Here's a simple example. Suppose you have three text elements A, B, C. You want to display them 1000ms apart in a trial, but you want them in random order, so *not* always A->B->C, but sometimes B->C->A or A->C->B etc.

<block myblock>
/ trials = [1-10 = example]
</block>

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
/ validresponse = (57)
/ posttrialpause = 500
</trial>

<list stimuli>
/ items = (text.a, text.b, text.c)
/ selectionmode = random
/ replace = false
/ selectionrate = always
</list>

<text a>
/ items = ("A")
/ size = (5%,5%)
</text>

<text b>
/ items = ("B")
/ size = (5%,5%)
</text>

<text c>
/ items = ("C")
/ size = (5%,5%)
</text>


Okay, I understand. So this is my script now, does this look correct? I would like my <texts> to refer to the specific items. So, if the text PolADem1G was run, I'd like the scores in PolADem1G's item to randomly appear on the screen. Please let me know if this will work. Thank you!

<item PolADem1G>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolADem2B>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolARep1G>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolARep2B>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>


<text PolADem1G>
/items = PolADem1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>



<text PolADem2B>
/items = PolADem1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<text PolARep1G>
/items = PolARep1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<text PolARep2B>
/items = PolARep2B
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<list stimuli>
/items= (text.PolADem1G, text.PolADem2B, text.PolARep1G,
text.PolARep2B)
/selectionrate =always
/selectionmode =random
/replace = false
</list>

<trial example>
/ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);]
/ontrialend= [trial.example.resetstimulusframes()]
</trial>


Well, no. As I've explained previously (here: https://www.millisecond.com/forums/Topic28105.aspx ), a given <text> element will only select a single item per trial. So, if you want to sample multiple different PolADem1G scores, you need (a) more <text> elements and (b) use <list>s for the item selection in those <text> elements.

This is in addition to randomly setting up the stimulus presentation sequence as explained in this thread here.

Oh right, thank you!
Does this look better?:

<item Demplus>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item Demminus>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item Repplus>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item Repminus>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>


<text Demplus1>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Demplus2>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Demplus3>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<list Demplusitems>
/ poolsize = 3
/ selectionrate = always
</list>

<text Demminus1>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Demminus2>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Demminus3>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<list Demminusitems>
/ poolsize = 3
/ selectionrate = always
</list>

<text Repplus1>
/items = Repplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Repplus2>
/items = Repplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Repplus3>
/items = Repplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<list Repplusitems>
/ poolsize = 3
/ selectionrate = always
</list>

<text Repminus1>
/items = Repminus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Repminus2>
/items = Repminus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Repminus3>
/items = Repminus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<list Repminusitems>
/ poolsize = 3
/ selectionrate = always
</list>

<list stimuli>
/items= (text.Demplus1, text.Demplus2, text.Demplus3,
text.Demminus1,text.Demminus2,text.Demminus3, text.Repplus1,
text.Repplus2, text.Repplus3, text.Repminus1, text.Repminus2, text.Repminus3)


text.Repminus)
/selectionrate =always
/selectionmode =random
/replace = false
</list>

<trial example>
/ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);]
/ontrialend= [trial.example.resetstimulusframes(7000)]
</trial>
By Dave - 1/24/2020

Kksham052 - 1/24/2020
Dave - 1/24/2020
Kksham052 - 1/24/2020
Dave - 1/24/2020
Dave - 1/24/2020
Kksham052 - 1/24/2020
Dave - 1/20/2020
Kksham052 - 1/19/2020
Dave - 1/17/2020
Kksham052 - 1/17/2020
Hello all,
For my script, I want to make four items/groups (Dem1+, Dem2-, Rep1+, and Rep2-) and each item will have 20 numbers. I then want to place two of these items, Dem1+ and Rep2-, in one group(group1) and the other, Dem2- and Rep1+ in another group (group2). My ultimate goal is when group 1 is selected for inquisit to randomly select Dem2- or Rep1+  and then randomly run those 20 numbers in each item. 

I don't know if Inquisit is able to do this, so I would appreciate any advice.

My thinking is to have a script that would have an <item> in an <item>. This is because I know that you can make a script select numbers from a <item> randomly but then when it gets to the trial, you have to manually type in a random order (pseduorandimzie).
I have inserted a file image to better illustrate. 

Thank you!

  

Sorry, I don't understand your description at all. In particular, what are "My thinking is to have a script that would have an <item> in an <item>" and "when it gets to the trial, you have to manually type in a random order" supposed to mean? Randomize what?

Please provide a concrete description of what exactly you want to implement.

Sorry for the confusion ,
I'll try to describe what I would like to happen in detail:

So, I have four groups with scores in each of them. There's Dem1+, Rep1+, Dem2- and Rep2-.
I want to show these scores/numbers to the participants and I would like to show them in random order.
So if someone is viewing a score from Dem1+, scores1, scores2 and scores 3 would show in random order. 
However, I would also like the selection of the groups of numbers to be random too, so the participants would randomly get Dem1+, Rep+, Dem2- and Rep2-. 

I know for a script, It would be easy to get the scores to be randomized because you can select "replace" in the trials. But in the trails, you also have to say what items you want to appear. For example 0=replace(Dem1+);1000= replace(Rep1-). While the scores are selected randomly, for every participant they will get Dem+1 first and Rep1- second. However, I do not want to have Rep-1 and Dem1+...etc appear in that order every time, I would like it to be a random selection of Rep-1 and Dem1+...

So, ideally, I would want the script to pick what scores it will present randomly and what item (Dem1+, Rep-1) it will present randomly as well. 

I have no idea if I can do this on inquisit, hopefully this is a better explanation and thank you for your help.
 

You can have a trial set up a random stimulus presentation sequence by using a <list> with the stimulus elements in it and using the insertstimulustime() function.

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
    ...;
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
...
</trial>

<list stimuli>
/ items = (text.demplus_1, text.demplus_2, ..., text.repplus_1, text.repplus_2, ..., text.demminus_1, text.demminus_2, ..., text.repminus_1, text.repminus_1, ...)
/ selectionrate = always
/ selectionmode = random
/ replace = false
</list>

//dem plus
<text demplus_1>
...
</text>

<text demplus_2>
...
</text>
...

// rep plus
<text repplus_1>
...
</text>

<text repplus_2>
...
</text>
...

// dem minus
<text demminus_1>
...
</text>

<text demminus_2>
...
</text>
...

// rep minus
<text repminus_1>
...
</text>

<text repminus_2>
...
</text>
...



Hi Dave,
Thank you for your response. Sorry, my response is late but I just have one question about your response. What is the purpose of the this portion of the script and why are we using it with the <list> function?: 
<trial example>
/ ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);
  ...;
]
/ ontrialend = [
  trial.example.resetstimulusframes();
]
...
</trial>

The text elements are the list's items. Items -- that is text elements -- are sample randomly from the list at the start of the trial and inserted into the stimulus presentation sequence.

Here's a simple example. Suppose you have three text elements A, B, C. You want to display them 1000ms apart in a trial, but you want them in random order, so *not* always A->B->C, but sometimes B->C->A or A->C->B etc.

<block myblock>
/ trials = [1-10 = example]
</block>

<trial example>
/ ontrialbegin = [
    trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
    trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
]
/ ontrialend = [
    trial.example.resetstimulusframes();
]
/ validresponse = (57)
/ posttrialpause = 500
</trial>

<list stimuli>
/ items = (text.a, text.b, text.c)
/ selectionmode = random
/ replace = false
/ selectionrate = always
</list>

<text a>
/ items = ("A")
/ size = (5%,5%)
</text>

<text b>
/ items = ("B")
/ size = (5%,5%)
</text>

<text c>
/ items = ("C")
/ size = (5%,5%)
</text>


Okay, I understand. So this is my script now, does this look correct? I would like my <texts> to refer to the specific items. So, if the text PolADem1G was run, I'd like the scores in PolADem1G's item to randomly appear on the screen. Please let me know if this will work. Thank you!

<item PolADem1G>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolADem2B>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolARep1G>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item PolARep2B>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>


<text PolADem1G>
/items = PolADem1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>



<text PolADem2B>
/items = PolADem1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<text PolARep1G>
/items = PolARep1G
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<text PolARep2B>
/items = PolARep2B
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>


<list stimuli>
/items= (text.PolADem1G, text.PolADem2B, text.PolARep1G,
text.PolARep2B)
/selectionrate =always
/selectionmode =random
/replace = false
</list>

<trial example>
/ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);]
/ontrialend= [trial.example.resetstimulusframes()]
</trial>


Well, no. As I've explained previously (here: https://www.millisecond.com/forums/Topic28105.aspx ), a given <text> element will only select a single item per trial. So, if you want to sample multiple different PolADem1G scores, you need (a) more <text> elements and (b) use <list>s for the item selection in those <text> elements.

This is in addition to randomly setting up the stimulus presentation sequence as explained in this thread here.

Oh right, thank you!
Does this look better?:

<item Demplus>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item Demminus>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item Repplus>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>

<item Repminus>
/1 = "score1"
/2 = "score2"
/3 = "score3"
</item>


<text Demplus1>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Demplus2>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Demplus3>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<list Demplusitems>
/ poolsize = 3
/ selectionrate = always
</list>

<text Demminus1>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Demminus2>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Demminus3>
/items = Demplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<list Demminusitems>
/ poolsize = 3
/ selectionrate = always
</list>

<text Repplus1>
/items = Repplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Repplus2>
/items = Repplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Repplus3>
/items = Repplus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<list Repplusitems>
/ poolsize = 3
/ selectionrate = always
</list>

<text Repminus1>
/items = Repminus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Repminus2>
/items = Repminus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<text Repminus3>
/items = Repminus
/txcolor = (blue)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
</text>

<list Repminusitems>
/ poolsize = 3
/ selectionrate = always
</list>

<list stimuli>
/items= (text.Demplus1, text.Demplus2, text.Demplus3,
text.Demminus1,text.Demminus2,text.Demminus3, text.Repplus1,
text.Repplus2, text.Repplus3, text.Repminus1, text.Repminus2, text.Repminus3)


text.Repminus)
/selectionrate =always
/selectionmode =random
/replace = false
</list>

<trial example>
/ontrialbegin = [
  trial.example.insertstimulustime(list.stimuli.nextvalue, 0);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 1000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 2000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 3000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 4000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 5000);
  trial.example.insertstimulustime(list.stimuli.nextvalue, 6000);]
/ontrialend= [trial.example.resetstimulusframes(7000)]
</trial>

It does not appear that your <text> elements actually use the <list> elements you added for selection.

Take another look at https://www.millisecond.com/forums/FindPost28106.aspx please. This here is key:

<text Repscore1>
/items = Repscore
/txcolor = (red)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
/ select = list.repscoreitems.nextindex
</text>

<text Repscore2>
/items = Repscore
/txcolor = (red)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
/ select = list.repscoreitems.nextindex
</text>

<text Repscore3>
/items = Repscore
/txcolor = (red)
/txbgcolor = (white)
/animation = path (5000, 1, 0%, 90%, 100%, 90%)
/ select = list.repscoreitems.nextindex
</text>

and since you at leas back then wanted to sample from the score items randomly *with* replacement, you should set

//three items in this example
<list repscoreitems>
/ poolsize = 3
/ selectionrate = always
/ replace = true
</list>