Millisecond Forums

Enable copying of unique codes for mTurk studies

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

By audiosophy - 9/17/2015

Hi,

Our university just got hold of Inquisit Web and I am running a study which produces a unique code that participants use to get paid. The trouble is, once in Inquisit, there seems to be no way to copy and paste this code for later pasting into mTurk. 

Is the only solution to ask participants to keep a pen and paper handy? Or is there some code that will allow my participants to copy and paste this code? 

Thanks,
By Dave - 9/18/2015

Paper and pencil is the fail-safe solution (which I'd recommend). As a potential alternative or in addition, you *could* display the code in a <surveypage> / <textbox> element. Participants could then select and copy the code via the context menu:

https://www.millisecond.com/forums/uploads/images/332f0f85-5669-4b13-b473-30a6.png

Example code for the above:

<expt>
/ blocks = [1=myblock]
</expt>

<block myblock>
/ trials = [1=mytrial; 2=codepage]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("Press the spacebar.")
</text>

<surveypage codepage>
/ showpagenumbers = false
/ showquestionnumbers = false
/ questions = [1=codebox]
</surveypage>

<textbox codebox>
/ caption = "Select and copy the following code:"
/ defaultresponse = "ABCD1234"
</textbox>

By audiosophy - 9/20/2015

ah didn't realise you could do a default response in a check box. That's definitely a workaround that will hopefully ease my participants experience. Thanks Dave :)
By audiosophy - 10/29/2015

Sorry, it took me a while till I needed to program this, but I just realised you can't insert a value into the default box right? As in:

<textbox codebox>
/ caption = "Your unique code is <%values.mturkcode%> - You can write this down or use the mouse to select, right click and copy it (keystrokes will not work) from the box below:"
/ defaultresponse = "<%values.mturkcode%>"
</textbox>

So in that case pen and paper IS the only method? 
By Dave - 10/29/2015

No, it should actually work like that:

<expt>
/ blocks = [1=myblock]
</expt>

<values>
/ mycode = ""
</values>

<block myblock>
/ onblockbegin = [values.mycode=round(rand(1000,9999))]
/ trials = [1=mytrial; 2=codepage]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("Press the spacebar.")
</text>

<surveypage codepage>
/ showpagenumbers = false
/ showquestionnumbers = false
/ questions = [1=codebox]
</surveypage>

<textbox codebox>
/ caption = "Select and copy the following code:"
/ defaultresponse = values.mycode
</textbox>
By audiosophy - 10/29/2015

Ah that's worked like a charm. thanks a bunch