Group: Administrators
Posts: 13K,
Visits: 104K
|
Here's a very simple example to illustrate the <openended> / "chat box" part:
<block myblock> / trials = [1-4=chat] </block>
<openended chat> / ontrialbegin = [values.chatmessages=concat(values.chatmessages, list.computermessages.nextvalue)] / ontrialend = [values.chatmessages=concat(concat(values.chatmessages, openended.chat.response),"~r")] / stimulusframes = [1=chatbox] / buttonlabel = "Send" / position = (50%, 90%) </openended>
<text chatbox> / items = ("<%values.chatmessages%>") / position = (50%, 30%) / size = (30%, 40%) / txbgcolor = black / txcolor = white / hjustify = left / vjustify = top / erase = false </text>
<list computermessages> / items = ("> Computer: Hi!~n", "> Computer: How are you?~n", "> Computer: What's your favorite food?~n", "> Computer: Nice!~n") / selectionmode = sequence </list>
<values> / chatmessages = "" </values>
|