Help, inserting instructions before Block 3


Author
Message
oconnordavid15
oconnordavid15
Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)
Group: Forum Members
Posts: 39, Visits: 63
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
oconnordavid15 - 1/31/2022
Dave - 1/31/2022
oconnordavid15 - 1/31/2022
Dave - 1/28/2022

> I could code this as
>
> <list corrrect_answer_trial01>
> / items = ("green")
> </list>

Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.)

<list list_correct_answer>
/ items = (list.corrrect_answer_trial01.item.1,
    ...,
    list.corrrect_answer_trial22.item.1)
/ selectionmode = values.current_list
</list>


and make use of that just like you already make use of the other lists set up in exactly the same way.



Hi Dave,

This is the logic I implemented

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial01 == 1;
    } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial01 == 0;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial02 == 1;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial02 == 0;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial03 == 1;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial03 == 0;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial04 == 1;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial04 == 0;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial05 == 1;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial05 == 0;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial06 == 1;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial06 == 0;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial07 == 1;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial07 == 0;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial08 == 1;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial08 == 0;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial09 == 1;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial09 == 0;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial10 == 1;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial10 == 0;

Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial01 == 1;
  } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial01 == 0;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial02 == 1;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial02 == 0;
....
 
Wrong operator.

thank you

Hi Dave,

Stopping and starting timer for every trial, does this look about right?

*logic to start-timing*
            
    if (values.current_list == 1;)
{clock.timer_1.start}
    else if (values.current_list == 2;)
{clock.timer_2.start}
    
    
    *logic to stop timing*
    
    if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1)
            
        {
            clock.timer_1.stop
        }
    else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2)

        {
            clock.timer_2.stop
        }

output
timer_1,
timer_2
etc.

sincerely,
David

That's not an answerable question based on an out-of-context code snippet.

Sorry, I should have formulated my question better. My apologies.

If I want to time each trial, and output how long each trial took, would I use

<clock>
/ mode = stopwatch
/ resetrate = block
/ format = "mm:ss"
</clock>

I do not know how to time a trial, and output it

What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task?

Hi Dave,

I would like to time each "game round" (1 - 22). And output "time to decision" for each round.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
oconnordavid15 - 1/31/2022
Dave - 1/31/2022
oconnordavid15 - 1/31/2022
Dave - 1/28/2022

> I could code this as
>
> <list corrrect_answer_trial01>
> / items = ("green")
> </list>

Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.)

<list list_correct_answer>
/ items = (list.corrrect_answer_trial01.item.1,
    ...,
    list.corrrect_answer_trial22.item.1)
/ selectionmode = values.current_list
</list>


and make use of that just like you already make use of the other lists set up in exactly the same way.



Hi Dave,

This is the logic I implemented

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial01 == 1;
    } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial01 == 0;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial02 == 1;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial02 == 0;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial03 == 1;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial03 == 0;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial04 == 1;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial04 == 0;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial05 == 1;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial05 == 0;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial06 == 1;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial06 == 0;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial07 == 1;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial07 == 0;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial08 == 1;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial08 == 0;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial09 == 1;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial09 == 0;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial10 == 1;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial10 == 0;

Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial01 == 1;
  } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial01 == 0;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial02 == 1;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial02 == 0;
....
 
Wrong operator.

thank you

Hi Dave,

Stopping and starting timer for every trial, does this look about right?

*logic to start-timing*
            
    if (values.current_list == 1;)
{clock.timer_1.start}
    else if (values.current_list == 2;)
{clock.timer_2.start}
    
    
    *logic to stop timing*
    
    if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1)
            
        {
            clock.timer_1.stop
        }
    else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2)

        {
            clock.timer_2.stop
        }

output
timer_1,
timer_2
etc.

sincerely,
David

That's not an answerable question based on an out-of-context code snippet.

Sorry, I should have formulated my question better. My apologies.

If I want to time each trial, and output how long each trial took, would I use

<clock>
/ mode = stopwatch
/ resetrate = block
/ format = "mm:ss"
</clock>

I do not know how to time a trial, and output it

What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task?

Hi Dave,

I would like to time each "game round" (1 - 22). And output "time to decision" for each round.

Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds.

https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm


oconnordavid15
oconnordavid15
Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)
Group: Forum Members
Posts: 39, Visits: 63
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
oconnordavid15 - 1/31/2022
Dave - 1/31/2022
oconnordavid15 - 1/31/2022
Dave - 1/28/2022

> I could code this as
>
> <list corrrect_answer_trial01>
> / items = ("green")
> </list>

Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.)

<list list_correct_answer>
/ items = (list.corrrect_answer_trial01.item.1,
    ...,
    list.corrrect_answer_trial22.item.1)
/ selectionmode = values.current_list
</list>


and make use of that just like you already make use of the other lists set up in exactly the same way.



Hi Dave,

This is the logic I implemented

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial01 == 1;
    } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial01 == 0;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial02 == 1;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial02 == 0;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial03 == 1;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial03 == 0;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial04 == 1;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial04 == 0;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial05 == 1;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial05 == 0;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial06 == 1;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial06 == 0;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial07 == 1;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial07 == 0;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial08 == 1;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial08 == 0;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial09 == 1;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial09 == 0;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial10 == 1;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial10 == 0;

Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial01 == 1;
  } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial01 == 0;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial02 == 1;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial02 == 0;
....
 
Wrong operator.

thank you

Hi Dave,

Stopping and starting timer for every trial, does this look about right?

*logic to start-timing*
            
    if (values.current_list == 1;)
{clock.timer_1.start}
    else if (values.current_list == 2;)
{clock.timer_2.start}
    
    
    *logic to stop timing*
    
    if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1)
            
        {
            clock.timer_1.stop
        }
    else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2)

        {
            clock.timer_2.stop
        }

output
timer_1,
timer_2
etc.

sincerely,
David

That's not an answerable question based on an out-of-context code snippet.

Sorry, I should have formulated my question better. My apologies.

If I want to time each trial, and output how long each trial took, would I use

<clock>
/ mode = stopwatch
/ resetrate = block
/ format = "mm:ss"
</clock>

I do not know how to time a trial, and output it

What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task?

Hi Dave,

I would like to time each "game round" (1 - 22). And output "time to decision" for each round.

Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds.

https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm

Hi Dave, 

Storing elapsed time using /onblockend

/ onblockend = [
    if (values.current_list == 1)
    {
            script.elapsedtime.elapsedtime = values.trial01_timer
    }
    else if (values.current_list == 2)
    {
            script.elapsedtime.elapsedtime = values.trial02_timer
    }
    else if (values.current_list == 3)
    {
            script.elapsedtime.elapsedtime = values.trial03_timer
    }
    else if (values.current_list == 4)
    {
            script.elapsedtime.elapsedtime = values.trial04_timer
    }
    else if (values.current_list == 5)
    {
            script.elapsedtime.elapsedtime = values.trial05_timer
    }
    else if (values.current_list == 6)
    {
            script.elapsedtime.elapsedtime = values.trial06_timer
    }
    else if (values.current_list == 7)
    {
            script.elapsedtime.elapsedtime = values.trial07_timer
    }
    else if (values.current_list == 8)
    {
            script.elapsedtime.elapsedtime = values.trial08_timer
    }
    else if (values.current_list == 9)
    {
            script.elapsedtime.elapsedtime = values.trial09_timer
    }
    else if (values.current_list == 10)
    {
            script.elapsedtime.elapsedtime = values.trial10_timer
    }
    else if (values.current_list == 11)
    {
            script.elapsedtime.elapsedtime = values.trial11_timer
    }
    else if (values.current_list == 12)
    {
            script.elapsedtime.elapsedtime = values.trial12_timer
    }
    else if (values.current_list == 13)
    {
            script.elapsedtime.elapsedtime = values.trial13_timer
    }
    else if (values.current_list == 14)
    {
            script.elapsedtime.elapsedtime = values.trial14_timer
    }
    else if (values.current_list == 15)
    {
            script.elapsedtime.elapsedtime = values.trial15_timer
    }
    else if (values.current_list == 16)
    {
            script.elapsedtime.elapsedtime = values.trial16_timer
    }
    else if (values.current_list == 17)
    {
            script.elapsedtime.elapsedtime = values.trial17_timer
    }
    else if (values.current_list == 18)
    {
            script.elapsedtime.elapsedtime = values.trial18_timer
    }
    else if (values.current_list == 19)
    {
            script.elapsedtime.elapsedtime = values.trial19_timer
    }
    else if (values.current_list == 20)
    {
            script.elapsedtime.elapsedtime = values.trial20_timer
    }
    else if (values.current_list == 21)
    {
            script.elapsedtime.elapsedtime = values.trial21_timer
    }
    else if (values.current_list == 22)
    {
            script.elapsedtime.elapsedtime = values.trial22_timer
    };

However I am using it inside of

<expt>

</expt>

Should I be using it instead inside the pressure 64 and pressure 9 block?

Attachments
ninesixtyfourFINAL6RANDOM.iqx (162 views, 153.00 KB)
oconnordavid15
oconnordavid15
Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)Partner Member (596 reputation)
Group: Forum Members
Posts: 39, Visits: 63
oconnordavid15 - 2/3/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
oconnordavid15 - 1/31/2022
Dave - 1/31/2022
oconnordavid15 - 1/31/2022
Dave - 1/28/2022

> I could code this as
>
> <list corrrect_answer_trial01>
> / items = ("green")
> </list>

Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.)

<list list_correct_answer>
/ items = (list.corrrect_answer_trial01.item.1,
    ...,
    list.corrrect_answer_trial22.item.1)
/ selectionmode = values.current_list
</list>


and make use of that just like you already make use of the other lists set up in exactly the same way.



Hi Dave,

This is the logic I implemented

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial01 == 1;
    } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial01 == 0;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial02 == 1;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial02 == 0;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial03 == 1;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial03 == 0;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial04 == 1;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial04 == 0;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial05 == 1;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial05 == 0;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial06 == 1;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial06 == 0;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial07 == 1;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial07 == 0;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial08 == 1;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial08 == 0;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial09 == 1;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial09 == 0;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial10 == 1;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial10 == 0;

Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial01 == 1;
  } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial01 == 0;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial02 == 1;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial02 == 0;
....
 
Wrong operator.

thank you

Hi Dave,

Stopping and starting timer for every trial, does this look about right?

*logic to start-timing*
            
    if (values.current_list == 1;)
{clock.timer_1.start}
    else if (values.current_list == 2;)
{clock.timer_2.start}
    
    
    *logic to stop timing*
    
    if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1)
            
        {
            clock.timer_1.stop
        }
    else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2)

        {
            clock.timer_2.stop
        }

output
timer_1,
timer_2
etc.

sincerely,
David

That's not an answerable question based on an out-of-context code snippet.

Sorry, I should have formulated my question better. My apologies.

If I want to time each trial, and output how long each trial took, would I use

<clock>
/ mode = stopwatch
/ resetrate = block
/ format = "mm:ss"
</clock>

I do not know how to time a trial, and output it

What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task?

Hi Dave,

I would like to time each "game round" (1 - 22). And output "time to decision" for each round.

Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds.

https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm

Hi Dave, 

Storing elapsed time using /onblockend

/ onblockend = [
    if (values.current_list == 1)
    {
            script.elapsedtime.elapsedtime = values.trial01_timer
    }
    else if (values.current_list == 2)
    {
            script.elapsedtime.elapsedtime = values.trial02_timer
    }
    else if (values.current_list == 3)
    {
            script.elapsedtime.elapsedtime = values.trial03_timer
    }
    else if (values.current_list == 4)
    {
            script.elapsedtime.elapsedtime = values.trial04_timer
    }
    else if (values.current_list == 5)
    {
            script.elapsedtime.elapsedtime = values.trial05_timer
    }
    else if (values.current_list == 6)
    {
            script.elapsedtime.elapsedtime = values.trial06_timer
    }
    else if (values.current_list == 7)
    {
            script.elapsedtime.elapsedtime = values.trial07_timer
    }
    else if (values.current_list == 8)
    {
            script.elapsedtime.elapsedtime = values.trial08_timer
    }
    else if (values.current_list == 9)
    {
            script.elapsedtime.elapsedtime = values.trial09_timer
    }
    else if (values.current_list == 10)
    {
            script.elapsedtime.elapsedtime = values.trial10_timer
    }
    else if (values.current_list == 11)
    {
            script.elapsedtime.elapsedtime = values.trial11_timer
    }
    else if (values.current_list == 12)
    {
            script.elapsedtime.elapsedtime = values.trial12_timer
    }
    else if (values.current_list == 13)
    {
            script.elapsedtime.elapsedtime = values.trial13_timer
    }
    else if (values.current_list == 14)
    {
            script.elapsedtime.elapsedtime = values.trial14_timer
    }
    else if (values.current_list == 15)
    {
            script.elapsedtime.elapsedtime = values.trial15_timer
    }
    else if (values.current_list == 16)
    {
            script.elapsedtime.elapsedtime = values.trial16_timer
    }
    else if (values.current_list == 17)
    {
            script.elapsedtime.elapsedtime = values.trial17_timer
    }
    else if (values.current_list == 18)
    {
            script.elapsedtime.elapsedtime = values.trial18_timer
    }
    else if (values.current_list == 19)
    {
            script.elapsedtime.elapsedtime = values.trial19_timer
    }
    else if (values.current_list == 20)
    {
            script.elapsedtime.elapsedtime = values.trial20_timer
    }
    else if (values.current_list == 21)
    {
            script.elapsedtime.elapsedtime = values.trial21_timer
    }
    else if (values.current_list == 22)
    {
            script.elapsedtime.elapsedtime = values.trial22_timer
    };

However I am using it inside of

<expt>

</expt>

Should I be using it instead inside the pressure 64 and pressure 9 block?

I am only getting a timed value for my first trial none of the others are recording
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
oconnordavid15 - 2/3/2022
oconnordavid15 - 2/3/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
oconnordavid15 - 1/31/2022
Dave - 1/31/2022
oconnordavid15 - 1/31/2022
Dave - 1/28/2022

> I could code this as
>
> <list corrrect_answer_trial01>
> / items = ("green")
> </list>

Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.)

<list list_correct_answer>
/ items = (list.corrrect_answer_trial01.item.1,
    ...,
    list.corrrect_answer_trial22.item.1)
/ selectionmode = values.current_list
</list>


and make use of that just like you already make use of the other lists set up in exactly the same way.



Hi Dave,

This is the logic I implemented

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial01 == 1;
    } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial01 == 0;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial02 == 1;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial02 == 0;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial03 == 1;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial03 == 0;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial04 == 1;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial04 == 0;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial05 == 1;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial05 == 0;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial06 == 1;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial06 == 0;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial07 == 1;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial07 == 0;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial08 == 1;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial08 == 0;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial09 == 1;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial09 == 0;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial10 == 1;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial10 == 0;

Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial01 == 1;
  } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial01 == 0;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial02 == 1;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial02 == 0;
....
 
Wrong operator.

thank you

Hi Dave,

Stopping and starting timer for every trial, does this look about right?

*logic to start-timing*
            
    if (values.current_list == 1;)
{clock.timer_1.start}
    else if (values.current_list == 2;)
{clock.timer_2.start}
    
    
    *logic to stop timing*
    
    if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1)
            
        {
            clock.timer_1.stop
        }
    else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2)

        {
            clock.timer_2.stop
        }

output
timer_1,
timer_2
etc.

sincerely,
David

That's not an answerable question based on an out-of-context code snippet.

Sorry, I should have formulated my question better. My apologies.

If I want to time each trial, and output how long each trial took, would I use

<clock>
/ mode = stopwatch
/ resetrate = block
/ format = "mm:ss"
</clock>

I do not know how to time a trial, and output it

What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task?

Hi Dave,

I would like to time each "game round" (1 - 22). And output "time to decision" for each round.

Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds.

https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm

Hi Dave, 

Storing elapsed time using /onblockend

/ onblockend = [
    if (values.current_list == 1)
    {
            script.elapsedtime.elapsedtime = values.trial01_timer
    }
    else if (values.current_list == 2)
    {
            script.elapsedtime.elapsedtime = values.trial02_timer
    }
    else if (values.current_list == 3)
    {
            script.elapsedtime.elapsedtime = values.trial03_timer
    }
    else if (values.current_list == 4)
    {
            script.elapsedtime.elapsedtime = values.trial04_timer
    }
    else if (values.current_list == 5)
    {
            script.elapsedtime.elapsedtime = values.trial05_timer
    }
    else if (values.current_list == 6)
    {
            script.elapsedtime.elapsedtime = values.trial06_timer
    }
    else if (values.current_list == 7)
    {
            script.elapsedtime.elapsedtime = values.trial07_timer
    }
    else if (values.current_list == 8)
    {
            script.elapsedtime.elapsedtime = values.trial08_timer
    }
    else if (values.current_list == 9)
    {
            script.elapsedtime.elapsedtime = values.trial09_timer
    }
    else if (values.current_list == 10)
    {
            script.elapsedtime.elapsedtime = values.trial10_timer
    }
    else if (values.current_list == 11)
    {
            script.elapsedtime.elapsedtime = values.trial11_timer
    }
    else if (values.current_list == 12)
    {
            script.elapsedtime.elapsedtime = values.trial12_timer
    }
    else if (values.current_list == 13)
    {
            script.elapsedtime.elapsedtime = values.trial13_timer
    }
    else if (values.current_list == 14)
    {
            script.elapsedtime.elapsedtime = values.trial14_timer
    }
    else if (values.current_list == 15)
    {
            script.elapsedtime.elapsedtime = values.trial15_timer
    }
    else if (values.current_list == 16)
    {
            script.elapsedtime.elapsedtime = values.trial16_timer
    }
    else if (values.current_list == 17)
    {
            script.elapsedtime.elapsedtime = values.trial17_timer
    }
    else if (values.current_list == 18)
    {
            script.elapsedtime.elapsedtime = values.trial18_timer
    }
    else if (values.current_list == 19)
    {
            script.elapsedtime.elapsedtime = values.trial19_timer
    }
    else if (values.current_list == 20)
    {
            script.elapsedtime.elapsedtime = values.trial20_timer
    }
    else if (values.current_list == 21)
    {
            script.elapsedtime.elapsedtime = values.trial21_timer
    }
    else if (values.current_list == 22)
    {
            script.elapsedtime.elapsedtime = values.trial22_timer
    };

However I am using it inside of

<expt>

</expt>

Should I be using it instead inside the pressure 64 and pressure 9 block?

I am only getting a timed value for my first trial none of the others are recording

(1) There is no such thing as script.elapsedtime.elapsedtime.
(2) Script.elapsedtime is not what you want. You want the respective block's elapsedtime.
(3) This is simply wrong.

/ onblockend = [
  if (values.current_list == 1)
  {
    script.elapsedtime.elapsedtime = values.trial01_timer
  }
  else if (values.current_list == 2)
  {
    script.elapsedtime.elapsedtime = values.trial02_timer
  }
...
]

You do not want to give elapsed time the value of values.trial01_timer. You want the exact opposite.

(4) > "I am only getting a timed value for my first trial none of the others are recording"

That is because you have THIS elsewhere



which is also wrong.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Dave - 2/3/2022
oconnordavid15 - 2/3/2022
oconnordavid15 - 2/3/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
Dave - 2/1/2022
oconnordavid15 - 2/1/2022
oconnordavid15 - 1/31/2022
Dave - 1/31/2022
oconnordavid15 - 1/31/2022
Dave - 1/28/2022

> I could code this as
>
> <list corrrect_answer_trial01>
> / items = ("green")
> </list>

Yes, that is one way to do it. And then you could have a list of lists tied to values.current_list (many such lists already exist in the script, cf. <list masterlist>, <list list_colornames_left>, <list list_colornames_right>, etc.)

<list list_correct_answer>
/ items = (list.corrrect_answer_trial01.item.1,
    ...,
    list.corrrect_answer_trial22.item.1)
/ selectionmode = values.current_list
</list>


and make use of that just like you already make use of the other lists set up in exactly the same way.



Hi Dave,

This is the logic I implemented

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial01 == 1;
    } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial01 == 0;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial02 == 1;
    } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial02 == 0;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial03 == 1;
    } else if (values.current_list == 3 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial03 == 0;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial04 == 1;
    } else if (values.current_list == 4 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial04 == 0;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial05 == 1;
    } else if (values.current_list == 5 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial05 == 0;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial06 == 1;
    } else if (values.current_list == 6 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial06 == 0;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial07 == 1;
    } else if (values.current_list == 7 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial07 == 0;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial08 == 1;
    } else if (values.current_list == 8 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial08 == 0;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial09 == 1;
    } else if (values.current_list == 9 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial09 == 0;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
        values.accuracy_trial10 == 1;
    } else if (values.current_list == 10 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
        values.accuracy_trial10 == 0;

Then I output values.accuracy_trial1-22 in the summary sheet. All zeros my logic must be wrong

if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial01 == 1;
  } else if (values.current_list == 1 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial01 == 0;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color1"){
   values.accuracy_trial02 == 1;
  } else if (values.current_list == 2 && trial.trial_choose.response == "responseoption_trialdecide_color2"){
   values.accuracy_trial02 == 0;
....
 
Wrong operator.

thank you

Hi Dave,

Stopping and starting timer for every trial, does this look about right?

*logic to start-timing*
            
    if (values.current_list == 1;)
{clock.timer_1.start}
    else if (values.current_list == 2;)
{clock.timer_2.start}
    
    
    *logic to stop timing*
    
    if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 1)
            
        {
            clock.timer_1.stop
        }
    else if ((trial.trial_choose.response == "responseoption_trialdecide_color1" || trial.trial_choose.response == "responseoption_trialdecide_color2") && values.current_list == 2)

        {
            clock.timer_2.stop
        }

output
timer_1,
timer_2
etc.

sincerely,
David

That's not an answerable question based on an out-of-context code snippet.

Sorry, I should have formulated my question better. My apologies.

If I want to time each trial, and output how long each trial took, would I use

<clock>
/ mode = stopwatch
/ resetrate = block
/ format = "mm:ss"
</clock>

I do not know how to time a trial, and output it

What do you mean by "time" a trial? The clock stimulus is there to display a timer on-screen., it has nothing to do with logging. It's also not clear what you mean by "trial". Are you referring to a single instance of a <trial>? Are you referring to a <block> of X trials, which in the script at hand represents a single "game round" in the task?

Hi Dave,

I would like to time each "game round" (1 - 22). And output "time to decision" for each round.

Each game round is a block. <block boxtask_pressure9> is for the 9-box rounds, <block boxtask_pressure64> is for the 64-box rounds. The block ends when a decision is made. So you simply store the respective block's elapsedtime property in the appropriate value /onblockend. Elapsedtime is in milliseconds, so divide by 1000 to get seconds.

https://www.millisecond.com/support/docs/v6/html/language/properties/elapsedtime.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/onblockend.htm

Hi Dave, 

Storing elapsed time using /onblockend

/ onblockend = [
    if (values.current_list == 1)
    {
            script.elapsedtime.elapsedtime = values.trial01_timer
    }
    else if (values.current_list == 2)
    {
            script.elapsedtime.elapsedtime = values.trial02_timer
    }
    else if (values.current_list == 3)
    {
            script.elapsedtime.elapsedtime = values.trial03_timer
    }
    else if (values.current_list == 4)
    {
            script.elapsedtime.elapsedtime = values.trial04_timer
    }
    else if (values.current_list == 5)
    {
            script.elapsedtime.elapsedtime = values.trial05_timer
    }
    else if (values.current_list == 6)
    {
            script.elapsedtime.elapsedtime = values.trial06_timer
    }
    else if (values.current_list == 7)
    {
            script.elapsedtime.elapsedtime = values.trial07_timer
    }
    else if (values.current_list == 8)
    {
            script.elapsedtime.elapsedtime = values.trial08_timer
    }
    else if (values.current_list == 9)
    {
            script.elapsedtime.elapsedtime = values.trial09_timer
    }
    else if (values.current_list == 10)
    {
            script.elapsedtime.elapsedtime = values.trial10_timer
    }
    else if (values.current_list == 11)
    {
            script.elapsedtime.elapsedtime = values.trial11_timer
    }
    else if (values.current_list == 12)
    {
            script.elapsedtime.elapsedtime = values.trial12_timer
    }
    else if (values.current_list == 13)
    {
            script.elapsedtime.elapsedtime = values.trial13_timer
    }
    else if (values.current_list == 14)
    {
            script.elapsedtime.elapsedtime = values.trial14_timer
    }
    else if (values.current_list == 15)
    {
            script.elapsedtime.elapsedtime = values.trial15_timer
    }
    else if (values.current_list == 16)
    {
            script.elapsedtime.elapsedtime = values.trial16_timer
    }
    else if (values.current_list == 17)
    {
            script.elapsedtime.elapsedtime = values.trial17_timer
    }
    else if (values.current_list == 18)
    {
            script.elapsedtime.elapsedtime = values.trial18_timer
    }
    else if (values.current_list == 19)
    {
            script.elapsedtime.elapsedtime = values.trial19_timer
    }
    else if (values.current_list == 20)
    {
            script.elapsedtime.elapsedtime = values.trial20_timer
    }
    else if (values.current_list == 21)
    {
            script.elapsedtime.elapsedtime = values.trial21_timer
    }
    else if (values.current_list == 22)
    {
            script.elapsedtime.elapsedtime = values.trial22_timer
    };

However I am using it inside of

<expt>

</expt>

Should I be using it instead inside the pressure 64 and pressure 9 block?

I am only getting a timed value for my first trial none of the others are recording

(1) There is no such thing as script.elapsedtime.elapsedtime.
(2) Script.elapsedtime is not what you want. You want the respective block's elapsedtime.
(3) This is simply wrong.

/ onblockend = [
  if (values.current_list == 1)
  {
    script.elapsedtime.elapsedtime = values.trial01_timer
  }
  else if (values.current_list == 2)
  {
    script.elapsedtime.elapsedtime = values.trial02_timer
  }
...
]

You do not want to give elapsed time the value of values.trial01_timer. You want the exact opposite.

(4) > "I am only getting a timed value for my first trial none of the others are recording"

That is because you have THIS elsewhere



which is also wrong.

Here's a fixed version. Work through this, please. You'll see that what's done is really not any different from other variables you wanted recorded and implemented before and discussed here at length. Apply this to anything else you may want to add.

Attachments
ninesixtyfourFINAL6RANDOM.iqx (160 views, 155.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search