Cued Recall Priming Paradigm - How to insert a textbox, when a specified key is pressed?


Author
Message
DannyPilgrim
DannyPilgrim
New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)
Group: Forum Members
Posts: 16, Visits: 73
Hello everyone,

I am programming an cued recall priming paradigm.
It consists of a Studyphase and a Testphase. Picture 1 shows how a trial of the Studyphase and of the Testphase looks like.


Studyphase:
The following Trials shows the properties for the trial when the participants do not have to react

<trial ÜL1>
/ontrialbegin = [
    values.condition = 0;
    values.congruency = 0;
     trial.ÜL1.resetstimulusframes();
  trial.ÜL1.insertstimulustime(clearscreen);
  trial.ÜL1.insertstimulustime(text.Fixationcross, parameters.clearduration);
  trial.ÜL1.insertstimulustime(clearscreen, parameters.clearduration + parameters.fixationduration);
  trial.ÜL1.insertstimulustime(text.Der, parameters.clearduration + parameters.fixationduration + parameters.clearduration);
  trial.ÜL1.insertstimulustime(text.Abbruch, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.ist, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.ein, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.Befehl, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration);
]
/ trialduration = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ stimulustimes = [0=clearscreen]
/ontrialend = [
    list.condition.insertitem(trial.ÜL1.correct, 1)
    list.responses.insertitem(trial.ÜL1.correct, 1);
    list.responses_congruent.insertitem(trial.ÜL1.correct, 1);
    
    if (trial.ÜL1.correct) {        
        list.latencies.insertitem(trial.ÜL1.latency, 1);
        list.latencies_congruent.insertitem(trial.ÜL1.latency, 1);        
    }
]
</trial>

Testphase:
Is it possible to insert a command within the following trial which allows the subjects to write inside a textbox, when they think, that they know the target word?
As for this example the subjects can press the button "2" or "8" within "Maske" (xxxx). When they press "2", the textbox should appear and when they press "8", the next Trial should start.

<trial ÜT1>
/ontrialbegin = [
  values.condition = 0;
  values.congruency = 0;
  trial.ÜT1.resetstimulusframes();
trial.ÜT1.insertstimulustime(clearscreen);
trial.ÜT1.insertstimulustime(text.Fixationcross, parameters.clearduration);
trial.ÜT1.insertstimulustime(clearscreen, parameters.clearduration + parameters.fixationduration);
trial.ÜT1.insertstimulustime(text.Das, parameters.clearduration + parameters.fixationduration + parameters.clearduration);
trial.ÜT1.insertstimulustime(text.Foto, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.ist, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.ein, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.Porträt, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration);
  trial.ÜT1.insertstimulustime(text.Maske, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration + parameters.maskduration);
]
/ correctresponse = ("2") / beginresponsetime = values.fixationonset + parameters.fixationduration + parameters.primeduration + parameters.clearduration
/ validresponse = ("2", "8")
/ trialduration = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ stimulustimes = [0=clearscreen]
/ontrialend = [
  list.condition.insertitem(trial.ÜT1.correct, 1)
  list.responses.insertitem(trial.ÜT1.correct, 1);
  list.responses_congruent.insertitem(trial.ÜT1.correct, 1);
 
  if (trial.ÜT1.correct) {  
   list.latencies.insertitem(trial.ÜT1.latency, 1);
   list.latencies_congruent.insertitem(trial.ÜT1.latency, 1);  
  }
]
</trial>

Textbox:
The following command specifies the Textbox. As for property "required" I only inserted "true" but I am not sure wether it is needed or not.

<textbox TypeWord>
/ required = true
/ textboxsize = (25%,5%)
/ position = (50%, 50%)
/ caption = "Welches Wort beendete den Satz?"
</textbox>


Do you need more information to give a proper answer to my problem?
Thank you very much for your help!

Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
DannyPilgrim - 2/21/2021
Hello everyone,

I am programming an cued recall priming paradigm.
It consists of a Studyphase and a Testphase. Picture 1 shows how a trial of the Studyphase and of the Testphase looks like.


Studyphase:
The following Trials shows the properties for the trial when the participants do not have to react

<trial ÜL1>
/ontrialbegin = [
    values.condition = 0;
    values.congruency = 0;
     trial.ÜL1.resetstimulusframes();
  trial.ÜL1.insertstimulustime(clearscreen);
  trial.ÜL1.insertstimulustime(text.Fixationcross, parameters.clearduration);
  trial.ÜL1.insertstimulustime(clearscreen, parameters.clearduration + parameters.fixationduration);
  trial.ÜL1.insertstimulustime(text.Der, parameters.clearduration + parameters.fixationduration + parameters.clearduration);
  trial.ÜL1.insertstimulustime(text.Abbruch, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.ist, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.ein, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.Befehl, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration);
]
/ trialduration = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ stimulustimes = [0=clearscreen]
/ontrialend = [
    list.condition.insertitem(trial.ÜL1.correct, 1)
    list.responses.insertitem(trial.ÜL1.correct, 1);
    list.responses_congruent.insertitem(trial.ÜL1.correct, 1);
    
    if (trial.ÜL1.correct) {        
        list.latencies.insertitem(trial.ÜL1.latency, 1);
        list.latencies_congruent.insertitem(trial.ÜL1.latency, 1);        
    }
]
</trial>

Testphase:
Is it possible to insert a command within the following trial which allows the subjects to write inside a textbox, when they think, that they know the target word?
As for this example the subjects can press the button "2" or "8" within "Maske" (xxxx). When they press "2", the textbox should appear and when they press "8", the next Trial should start.

<trial ÜT1>
/ontrialbegin = [
  values.condition = 0;
  values.congruency = 0;
  trial.ÜT1.resetstimulusframes();
trial.ÜT1.insertstimulustime(clearscreen);
trial.ÜT1.insertstimulustime(text.Fixationcross, parameters.clearduration);
trial.ÜT1.insertstimulustime(clearscreen, parameters.clearduration + parameters.fixationduration);
trial.ÜT1.insertstimulustime(text.Das, parameters.clearduration + parameters.fixationduration + parameters.clearduration);
trial.ÜT1.insertstimulustime(text.Foto, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.ist, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.ein, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.Porträt, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration);
  trial.ÜT1.insertstimulustime(text.Maske, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration + parameters.maskduration);
]
/ correctresponse = ("2") / beginresponsetime = values.fixationonset + parameters.fixationduration + parameters.primeduration + parameters.clearduration
/ validresponse = ("2", "8")
/ trialduration = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ stimulustimes = [0=clearscreen]
/ontrialend = [
  list.condition.insertitem(trial.ÜT1.correct, 1)
  list.responses.insertitem(trial.ÜT1.correct, 1);
  list.responses_congruent.insertitem(trial.ÜT1.correct, 1);
 
  if (trial.ÜT1.correct) {  
   list.latencies.insertitem(trial.ÜT1.latency, 1);
   list.latencies_congruent.insertitem(trial.ÜT1.latency, 1);  
  }
]
</trial>

Textbox:
The following command specifies the Textbox. As for property "required" I only inserted "true" but I am not sure wether it is needed or not.

<textbox TypeWord>
/ required = true
/ textboxsize = (25%,5%)
/ position = (50%, 50%)
/ caption = "Welches Wort beendete den Satz?"
</textbox>


Do you need more information to give a proper answer to my problem?
Thank you very much for your help!

/branch to an <openended> element collecting the typed response.

https://www.millisecond.com/support/docs/v6/html/language/elements/openended.htm

DannyPilgrim
DannyPilgrim
New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)New Member (49 reputation)
Group: Forum Members
Posts: 16, Visits: 73
Dave - 2/21/2021
DannyPilgrim - 2/21/2021
Hello everyone,

I am programming an cued recall priming paradigm.
It consists of a Studyphase and a Testphase. Picture 1 shows how a trial of the Studyphase and of the Testphase looks like.


Studyphase:
The following Trials shows the properties for the trial when the participants do not have to react

<trial ÜL1>
/ontrialbegin = [
    values.condition = 0;
    values.congruency = 0;
     trial.ÜL1.resetstimulusframes();
  trial.ÜL1.insertstimulustime(clearscreen);
  trial.ÜL1.insertstimulustime(text.Fixationcross, parameters.clearduration);
  trial.ÜL1.insertstimulustime(clearscreen, parameters.clearduration + parameters.fixationduration);
  trial.ÜL1.insertstimulustime(text.Der, parameters.clearduration + parameters.fixationduration + parameters.clearduration);
  trial.ÜL1.insertstimulustime(text.Abbruch, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.ist, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.ein, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.Befehl, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration);
]
/ trialduration = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ stimulustimes = [0=clearscreen]
/ontrialend = [
    list.condition.insertitem(trial.ÜL1.correct, 1)
    list.responses.insertitem(trial.ÜL1.correct, 1);
    list.responses_congruent.insertitem(trial.ÜL1.correct, 1);
    
    if (trial.ÜL1.correct) {        
        list.latencies.insertitem(trial.ÜL1.latency, 1);
        list.latencies_congruent.insertitem(trial.ÜL1.latency, 1);        
    }
]
</trial>

Testphase:
Is it possible to insert a command within the following trial which allows the subjects to write inside a textbox, when they think, that they know the target word?
As for this example the subjects can press the button "2" or "8" within "Maske" (xxxx). When they press "2", the textbox should appear and when they press "8", the next Trial should start.

<trial ÜT1>
/ontrialbegin = [
  values.condition = 0;
  values.congruency = 0;
  trial.ÜT1.resetstimulusframes();
trial.ÜT1.insertstimulustime(clearscreen);
trial.ÜT1.insertstimulustime(text.Fixationcross, parameters.clearduration);
trial.ÜT1.insertstimulustime(clearscreen, parameters.clearduration + parameters.fixationduration);
trial.ÜT1.insertstimulustime(text.Das, parameters.clearduration + parameters.fixationduration + parameters.clearduration);
trial.ÜT1.insertstimulustime(text.Foto, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.ist, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.ein, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.Porträt, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration);
  trial.ÜT1.insertstimulustime(text.Maske, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration + parameters.maskduration);
]
/ correctresponse = ("2") / beginresponsetime = values.fixationonset + parameters.fixationduration + parameters.primeduration + parameters.clearduration
/ validresponse = ("2", "8")
/ trialduration = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ stimulustimes = [0=clearscreen]
/ontrialend = [
  list.condition.insertitem(trial.ÜT1.correct, 1)
  list.responses.insertitem(trial.ÜT1.correct, 1);
  list.responses_congruent.insertitem(trial.ÜT1.correct, 1);
 
  if (trial.ÜT1.correct) {  
   list.latencies.insertitem(trial.ÜT1.latency, 1);
   list.latencies_congruent.insertitem(trial.ÜT1.latency, 1);  
  }
]
</trial>

Textbox:
The following command specifies the Textbox. As for property "required" I only inserted "true" but I am not sure wether it is needed or not.

<textbox TypeWord>
/ required = true
/ textboxsize = (25%,5%)
/ position = (50%, 50%)
/ caption = "Welches Wort beendete den Satz?"
</textbox>


Do you need more information to give a proper answer to my problem?
Thank you very much for your help!

/branch to an <openended> element collecting the typed response.

https://www.millisecond.com/support/docs/v6/html/language/elements/openended.htm

Hello Dave!
Thank you for your qick answer.

This is how the trial looks now:
<trial ÜT1>
/ontrialbegin = [
    values.condition = 0;
    values.congruency = 0; values.fixationonset = 0;
     trial.ÜT1.resetstimulusframes();
  trial.ÜT1.insertstimulustime(clearscreen, values.fixationonset);
  trial.ÜT1.insertstimulustime(text.Fixationcross, values.fixationonset + parameters.clearduration);
  trial.ÜT1.insertstimulustime(clearscreen, values.fixationonset + parameters.clearduration + parameters.fixationduration);
  trial.ÜT1.insertstimulustime(text.DerG, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration);
  trial.ÜT1.insertstimulustime(text.Abbruch, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
    trial.ÜT1.insertstimulustime(text.ist, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
    trial.ÜT1.insertstimulustime(text.ein, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
    trial.ÜT1.insertstimulustime(text.Befehl, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
    trial.ÜT1.insertstimulustime(text.Maske, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration + parameters.maskduration);
]
/ correctresponse = ("2") / beginresponsetime = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ validresponse = ("2", "8")
/ branch = [if(trial.ÜT1.response== "2")openended.Frage]

/ stimulustimes = [0=clearscreen]
/ontrialend = [
    list.condition.insertitem(trial.ÜT1.correct, 1)
    list.responses.insertitem(trial.ÜT1.correct, 1);
    list.responses_congruent.insertitem(trial.ÜT1.correct, 1);
    
    if (trial.ÜT1.correct) {        
        list.latencies.insertitem(trial.ÜT1.latency, 1);
        list.latencies_congruent.insertitem(trial.ÜT1.latency, 1);        
    }
]
</trial>

This is the <openended>:
<openended Frage>
/ stimulusframes = [1= Question]
/ position = (50%, 50%)
/ linelength = 40
/ numlines = 1
</openended>

Unfortunately the trial does not redirect to the <openended> when "2" is pressed. The next trials just starts.
The <openended> itself works perfectly fine.

Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
DannyPilgrim - 2/21/2021
Dave - 2/21/2021
DannyPilgrim - 2/21/2021
Hello everyone,

I am programming an cued recall priming paradigm.
It consists of a Studyphase and a Testphase. Picture 1 shows how a trial of the Studyphase and of the Testphase looks like.


Studyphase:
The following Trials shows the properties for the trial when the participants do not have to react

<trial ÜL1>
/ontrialbegin = [
    values.condition = 0;
    values.congruency = 0;
     trial.ÜL1.resetstimulusframes();
  trial.ÜL1.insertstimulustime(clearscreen);
  trial.ÜL1.insertstimulustime(text.Fixationcross, parameters.clearduration);
  trial.ÜL1.insertstimulustime(clearscreen, parameters.clearduration + parameters.fixationduration);
  trial.ÜL1.insertstimulustime(text.Der, parameters.clearduration + parameters.fixationduration + parameters.clearduration);
  trial.ÜL1.insertstimulustime(text.Abbruch, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.ist, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.ein, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
    trial.ÜL1.insertstimulustime(text.Befehl, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration);
]
/ trialduration = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ stimulustimes = [0=clearscreen]
/ontrialend = [
    list.condition.insertitem(trial.ÜL1.correct, 1)
    list.responses.insertitem(trial.ÜL1.correct, 1);
    list.responses_congruent.insertitem(trial.ÜL1.correct, 1);
    
    if (trial.ÜL1.correct) {        
        list.latencies.insertitem(trial.ÜL1.latency, 1);
        list.latencies_congruent.insertitem(trial.ÜL1.latency, 1);        
    }
]
</trial>

Testphase:
Is it possible to insert a command within the following trial which allows the subjects to write inside a textbox, when they think, that they know the target word?
As for this example the subjects can press the button "2" or "8" within "Maske" (xxxx). When they press "2", the textbox should appear and when they press "8", the next Trial should start.

<trial ÜT1>
/ontrialbegin = [
  values.condition = 0;
  values.congruency = 0;
  trial.ÜT1.resetstimulusframes();
trial.ÜT1.insertstimulustime(clearscreen);
trial.ÜT1.insertstimulustime(text.Fixationcross, parameters.clearduration);
trial.ÜT1.insertstimulustime(clearscreen, parameters.clearduration + parameters.fixationduration);
trial.ÜT1.insertstimulustime(text.Das, parameters.clearduration + parameters.fixationduration + parameters.clearduration);
trial.ÜT1.insertstimulustime(text.Foto, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.ist, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.ein, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
  trial.ÜT1.insertstimulustime(text.Porträt, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration);
  trial.ÜT1.insertstimulustime(text.Maske, parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration + parameters.maskduration);
]
/ correctresponse = ("2") / beginresponsetime = values.fixationonset + parameters.fixationduration + parameters.primeduration + parameters.clearduration
/ validresponse = ("2", "8")
/ trialduration = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ stimulustimes = [0=clearscreen]
/ontrialend = [
  list.condition.insertitem(trial.ÜT1.correct, 1)
  list.responses.insertitem(trial.ÜT1.correct, 1);
  list.responses_congruent.insertitem(trial.ÜT1.correct, 1);
 
  if (trial.ÜT1.correct) {  
   list.latencies.insertitem(trial.ÜT1.latency, 1);
   list.latencies_congruent.insertitem(trial.ÜT1.latency, 1);  
  }
]
</trial>

Textbox:
The following command specifies the Textbox. As for property "required" I only inserted "true" but I am not sure wether it is needed or not.

<textbox TypeWord>
/ required = true
/ textboxsize = (25%,5%)
/ position = (50%, 50%)
/ caption = "Welches Wort beendete den Satz?"
</textbox>


Do you need more information to give a proper answer to my problem?
Thank you very much for your help!

/branch to an <openended> element collecting the typed response.

https://www.millisecond.com/support/docs/v6/html/language/elements/openended.htm

Hello Dave!
Thank you for your qick answer.

This is how the trial looks now:
<trial ÜT1>
/ontrialbegin = [
    values.condition = 0;
    values.congruency = 0; values.fixationonset = 0;
     trial.ÜT1.resetstimulusframes();
  trial.ÜT1.insertstimulustime(clearscreen, values.fixationonset);
  trial.ÜT1.insertstimulustime(text.Fixationcross, values.fixationonset + parameters.clearduration);
  trial.ÜT1.insertstimulustime(clearscreen, values.fixationonset + parameters.clearduration + parameters.fixationduration);
  trial.ÜT1.insertstimulustime(text.DerG, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration);
  trial.ÜT1.insertstimulustime(text.Abbruch, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration);
    trial.ÜT1.insertstimulustime(text.ist, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration);
    trial.ÜT1.insertstimulustime(text.ein, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
    trial.ÜT1.insertstimulustime(text.Befehl, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.wordduration);
    trial.ÜT1.insertstimulustime(text.Maske, values.fixationonset + parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration + parameters.maskduration);
]
/ correctresponse = ("2") / beginresponsetime = parameters.clearduration + parameters.fixationduration + parameters.clearduration + parameters.wordduration + parameters.wordduration + parameters.wordduration + parameters.targetduration
/ validresponse = ("2", "8")
/ branch = [if(trial.ÜT1.response== "2")openended.Frage]

/ stimulustimes = [0=clearscreen]
/ontrialend = [
    list.condition.insertitem(trial.ÜT1.correct, 1)
    list.responses.insertitem(trial.ÜT1.correct, 1);
    list.responses_congruent.insertitem(trial.ÜT1.correct, 1);
    
    if (trial.ÜT1.correct) {        
        list.latencies.insertitem(trial.ÜT1.latency, 1);
        list.latencies_congruent.insertitem(trial.ÜT1.latency, 1);        
    }
]
</trial>

This is the <openended>:
<openended Frage>
/ stimulusframes = [1= Question]
/ position = (50%, 50%)
/ linelength = 40
/ numlines = 1
</openended>

Unfortunately the trial does not redirect to the <openended> when "2" is pressed. The next trials just starts.
The <openended> itself works perfectly fine.

The response property returns the pressed key's numerical scancode (see Tools -> Keyboard Scancodes...), not the character. https://www.millisecond.com/support/docs/v6/html/language/scancodes.htm

The numerical scancode for the "2" key at the top of your keyboard is 3

Either use the scancode in the branch or use the responsetext property instead: https://www.millisecond.com/support/docs/v6/html/language/properties/responsetext.htm

<block exampleblock>
/ trials = [1=example]
</block>

<trial example>
/ stimulusframes = [1=instr]
/ validresponse = ("2", "8")
/ branch = [if (trial.example.responsetext == "2") {
    openended.Frage;
}
]
</trial>

<openended Frage>
/ stimulusframes = [1= Question]
/ position = (50%, 50%)
/ linelength = 40
/ numlines = 1
</openended>

<text instr>
/ items = ("Press '2' or '8'")
</text>

<text question>
/ items = ("Question goes here...")
/ position = (50%, 30%)
</text>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search