Show subject input to themselves


Author
Message
Coati
Coati
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 13, Visits: 81
Dear all,

I have another little problem I cannot find any solution for. In my experiment I want to show subjects a series of digits for a short time (2 seconds). After that a blank screen should pop up and subjects have now 5 seconds to type in the digits they remember from the former series. For this I want Inquisit to show the participants the digits they type in at the moment as kind of a feedback. 

So if they type in 123, the digits 1,2 and 3 should appear one after another. And if they delete a digit with the Backspace button the digit should disappear from the screen as well. I do not want to use an openended element because of the next-button and the frame, there should be just digits appearing in the middle of the screen.

I tried to figure out if the solution could be using the values element, but I could not get it going.

Is there any simple solution for this? As always, I really, really appreciate your help!

Jakob.


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: 104K
> Is there any simple solution for this?

No, there is no simple solution. At best, there is a complicated one along the following lines:

<block myblock>
/ onblockbegin = [values.typeddigits = ""; values.typetimeout = 5000; ]
/ trials = [1=type]
</block>

scancodes 2-10: digits 1 to 9 at the top of the keyboard
scancode 14: backspace
<trial type>
/ stimulusframes = [1=typetext]
/ validresponse = (2,3,4,5,6,7,8,9,10,14)
/ ontrialend = [if (trial.type.response != 14) values.typeddigits = concat(values.typeddigits, trial.type.response-1); ]
/ ontrialend = [if (trial.type.response == 14 && length(values.typeddigits) > 0) values.typeddigits = substring(values.typeddigits,0,length(values.typeddigits)-1); ]
/ ontrialend = [values.typetimeout -= trial.type.elapsedtime]
/ timeout = values.typetimeout
/ branch = [if (values.typetimeout > 0) trial.type]
</trial>

<text typetext>
/ items = ("<%values.typeddigits%>")
/ erase = false
/ size = (50%, 25%)
/ vjustify = center
</text>

<values>
/ typetimeout = 5000
/ typeddigits = ""
</values>


Edited 8 Years Ago by Dave
Coati
Coati
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 13, Visits: 81
That's fantastic, thank you very much for all your effort!

Coati
Coati
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 13, Visits: 81
Hey Dave, 

a further short question referring to this. I now want to show the participants a message that they have to type in something during the trial. 

I came up with this:


<block type>
/ onblockbegin = [values.typeddigits = ""; values.typetimeout = 7000]
/ trials = [1=type]
</block>

<trial type>
/ stimulusframes = [1=typetext; 1=instrtotype]
/ validresponse = (2,3,4,5,6,7,8,9,10,14)
/ ontrialend = [if (trial.type.response != 14) values.typeddigits = concat(values.typeddigits, trial.type.response-1); ]
/ ontrialend = [if (trial.type.response == 14 && length(values.typeddigits) > 0) values.typeddigits = substring(values.typeddigits,0,length(values.typeddigits)-1); ]
/ ontrialend = [values.typetimeout -= trial.type.elapsedtime]
/ timeout = values.typetimeout
/ branch = [if (values.typetimeout > 0) trial.type]

<text instrtotype>
/items = ("Type in:")
/select = noreplace
/position = (50, 35)
/ fontstyle = ("Arial", 28, true)
/txcolor = (0, 0, 0)

It works but the message is flickering with every new digit I type in. Is there any possibility that the message remains on the screen without flickering?

Thanks a lot!

Jakob. 


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: 104K
You need to set the <text> element's /erase attribute to 'false' for it to remain on-screen across trials.

Tingyu
Tingyu
Associate Member (69 reputation)Associate Member (69 reputation)Associate Member (69 reputation)Associate Member (69 reputation)Associate Member (69 reputation)Associate Member (69 reputation)Associate Member (69 reputation)Associate Member (69 reputation)Associate Member (69 reputation)
Group: Forum Members
Posts: 5, Visits: 23
Dave - 3/11/2016
> Is there any simple solution for this?

No, there is no simple solution. At best, there is a complicated one along the following lines:

<block myblock>
/ onblockbegin = [values.typeddigits = ""; values.typetimeout = 5000; ]
/ trials = [1=type]
</block>

scancodes 2-10: digits 1 to 9 at the top of the keyboard
scancode 14: backspace
<trial type>
/ stimulusframes = [1=typetext]
/ validresponse = (2,3,4,5,6,7,8,9,10,14)
/ ontrialend = [if (trial.type.response != 14) values.typeddigits = concat(values.typeddigits, trial.type.response-1); ]
/ ontrialend = [if (trial.type.response == 14 && length(values.typeddigits) > 0) values.typeddigits = substring(values.typeddigits,0,length(values.typeddigits)-1); ]
/ ontrialend = [values.typetimeout -= trial.type.elapsedtime]
/ timeout = values.typetimeout
/ branch = [if (values.typetimeout > 0) trial.type]
</trial>

<text typetext>
/ items = ("<%values.typeddigits%>")
/ erase = false
/ size = (50%, 25%)
/ vjustify = center
</text>

<values>
/ typetimeout = 5000
/ typeddigits = ""
</values>


Hi Dave,

I tried similar way to show letters subject input to themselves. But I found all of the letters shown are uppercas. May I ask is there anyway to show lowercase letters subject input?

Thank you!
Tingy


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: 104K
Tingyu - 2/20/2023
Dave - 3/11/2016
> Is there any simple solution for this?

No, there is no simple solution. At best, there is a complicated one along the following lines:

<block myblock>
/ onblockbegin = [values.typeddigits = ""; values.typetimeout = 5000; ]
/ trials = [1=type]
</block>

scancodes 2-10: digits 1 to 9 at the top of the keyboard
scancode 14: backspace
<trial type>
/ stimulusframes = [1=typetext]
/ validresponse = (2,3,4,5,6,7,8,9,10,14)
/ ontrialend = [if (trial.type.response != 14) values.typeddigits = concat(values.typeddigits, trial.type.response-1); ]
/ ontrialend = [if (trial.type.response == 14 && length(values.typeddigits) > 0) values.typeddigits = substring(values.typeddigits,0,length(values.typeddigits)-1); ]
/ ontrialend = [values.typetimeout -= trial.type.elapsedtime]
/ timeout = values.typetimeout
/ branch = [if (values.typetimeout > 0) trial.type]
</trial>

<text typetext>
/ items = ("<%values.typeddigits%>")
/ erase = false
/ size = (50%, 25%)
/ vjustify = center
</text>

<values>
/ typetimeout = 5000
/ typeddigits = ""
</values>


Hi Dave,

I tried similar way to show letters subject input to themselves. But I found all of the letters shown are uppercas. May I ask is there anyway to show lowercase letters subject input?

Thank you!
Tingy


Yes, by applying the the tolower() string function.

https://www.millisecond.com/support/docs/v4/html/language/expressions/functions.htm
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search