Typing task Inquisit 4


Author
Message
Wenkuo
Wenkuo
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 27, Visits: 47
Hi there,
I'm new at Inquisit and this is my first time on the forums, so I have no idea if I'm raising the topic correctly.

I have been trying to create a typing task on Inquisit 4 that will allow me to know when someone first starts typing an answer
and when someone stops typing. This part is currently working now, thanks to a lot of help from others, but it is the ending where I'm stuck. 
I want to add in a button that can be clicked on with the mouse, so that people can move on when they are finished.
However,  I can't seem to get that to work in Inquisit. 

This is the current script: 

<trial exppos>
/ stimulustimes = [1=blank,black,answer]
/ inputdevice = keyboard
/ validresponse = (16,17,18,19,20,21,22,23,24,25,30,31,32,33,34,35,36,37,38,44,45,46,47,48,49,50,28,14,51,52,57,79,2)
/ ontrialend = [if (trial.exppos.response == 16) values.letter = "q"]
/ ontrialend = [if (trial.exppos.response == 17) values.letter = "w"]
/ ontrialend = [if (trial.exppos.response == 18) values.letter = "e"]
/ ontrialend = [if (trial.exppos.response == 19) values.letter = "r"]
/ ontrialend = [if (trial.exppos.response == 20) values.letter = "t"]
/ ontrialend = [if (trial.exppos.response == 21) values.letter = "y"]
/ ontrialend = [if (trial.exppos.response == 22) values.letter = "u"]
/ ontrialend = [if (trial.exppos.response == 23) values.letter = "i"]
/ ontrialend = [if (trial.exppos.response == 24) values.letter = "o"]
/ ontrialend = [if (trial.exppos.response == 25) values.letter = "p"]
/ ontrialend = [if (trial.exppos.response == 30) values.letter = "a"]
/ ontrialend = [if (trial.exppos.response == 31) values.letter = "s"]
/ ontrialend = [if (trial.exppos.response == 32) values.letter = "d"]
/ ontrialend = [if (trial.exppos.response == 33) values.letter = "f"]
/ ontrialend = [if (trial.exppos.response == 34) values.letter = "g"]
/ ontrialend = [if (trial.exppos.response == 35) values.letter = "h"]
/ ontrialend = [if (trial.exppos.response == 36) values.letter = "j"]
/ ontrialend = [if (trial.exppos.response == 37) values.letter = "k"]
/ ontrialend = [if (trial.exppos.response == 38) values.letter = "l"]
/ ontrialend = [if (trial.exppos.response == 44) values.letter = "z"]
/ ontrialend = [if (trial.exppos.response == 45) values.letter = "x"]
/ ontrialend = [if (trial.exppos.response == 46) values.letter = "c"]
/ ontrialend = [if (trial.exppos.response == 47) values.letter = "v"]
/ ontrialend = [if (trial.exppos.response == 48) values.letter = "b"]
/ ontrialend = [if (trial.exppos.response == 49) values.letter = "n"]
/ ontrialend = [if (trial.exppos.response == 50) values.letter = "m"]
/ ontrialend = [if (trial.exppos.response == 28) values.letter = "~n"]
/ ontrialend = [if (trial.exppos.response == 57) values.letter = " "]
/ ontrialend = [if (trial.exppos.response == 51) values.letter = ","]
/ ontrialend = [if (trial.exppos.response == 52) values.letter = "."]
/ ontrialend = [if (trial.exppos.response != 14) {setitem(item.letter,values.letter,1); setitem(item.answer,values.answer,1)}]
/ ontrialend = [if (trial.exppos.response != 14) values.answer = concat(getitem(item.answer,1),getitem(item.letter,1))]
/ ontrialend = [setitem(item.answer,values.answer,1)]
/ ontrialend = [if (trial.exppos.response == 14) values.answer = substring(getitem(item.answer,1),0,length(values.answer)-1)]
/ ontrialend = [if (trial.exppos.response == 14) setitem(item.answer,values.answer,1)]
/ ontrialend = [values.currenttime = values.currenttime + trial.exppos.latency]
/ branch = [if (trial.exppos.response == 2) trial.end]
/ branch = [trial.exppos]
</trial>

<trial end>
/ ontrialbegin = [values.amount = 0; values.cumulative_time = 0; values.answer = ""; values.letter = "";values.currenttime = 0;values.select = values.select+1]
/ stimulusframes = [1 = blank]
/ recorddata = true
/ timeout = 1
</trial>

<item letter>
/1 = ""
</item>

<item answer>
/1 = ""
</item>

<values>
/amount = 0
/cumulative_time = 0
/answer = ""
/letter = ""
/currenttime = 0
/select = 1
</values>

<text answer>
/ items = ("<%values.answer%>")
/ position = (50%,75.5%)
/ erase = false
/txbgcolor = (255,255,255)
/ txcolor = (0, 0, 0)
/ size = (39.5%,19%)
/ valign = top
</text>

<shape blank>
/ shape = rectangle
/ size = (100%,100%)
/ color = (255,255,255)
/ erase = false
</shape>

<shape black>
/ shape = rectangle
/ size = (40%,20%)
/ color = (0,0,0)
/ erase = false
/ position = (50%,75%)
/ valign = top
</shape>

Is there any way to add in a button so that people can move on from this task with a simple mouseclick?

A second question is: does it matter what kind of keyboard someone has? The current code makes use of the scancodes as a valid response,
however, would it matter if some uses an azerty keyboard instead of a qwerty keyboard? 

I hope my questions are clear.

Many thanks in advance,

Wenkuo
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Wenkuo - 9 Years Ago
Dave - 9 Years Ago
Wenkuo - 9 Years Ago
Dave - 9 Years Ago
                     Thank you! It's working perfectly now.
Wenkuo - 9 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search