Millisecond Forums

add a line break to a string variable in the value element

https://forums.millisecond.com/Topic6575.aspx

By halkjelsvik - 9/5/2011

I try to add line breaks to a series of strings given by the particpants.


This actually does what I want:


/ ontrialend = [values.responsestring=concat(concat(values.responsestring,"(~n) -"),openended.enterword.response)]


however I do not want the paranthesis in the values variable. If I remove the paranthesis, inquisit tells me that there is an unmatched parathesis.

By Dave - 9/5/2011

<values>
/ responsestring = ""
/ newline = "~n"
</values>

<openended enterword>
/ stimulusframes = [1=myresponses]
/ ontrialend = [values.responsestring=concat(concat(values.responsestring,values.newline),openended.enterword.response)]
</openended>

<text myresponses>
/ items = ("<%values.responsestring%>")
/ position = (50%,10%)
/ size = (50%,20%)
</text>

<block myblock>
/ trials = [1-3=enterword]
</block>


Regards,


~Dave

By halkjelsvik - 9/5/2011

Many thanks!