Millisecond Forums

Assistance with Script

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

By Sphynx - 4/18/2015

Hi All,

I am wondering if there is anyone on the forum that would be able to please assist me in creating a script for a trial experiment that I am hoping to run using Inquisit. I have attempted to use the tutorials posted online to create this script, however I have not been successful thus far.

In terms of the task’s composition, I need participants to view the same 16 photos at five different points in time, and each time the photos are displayed, sequentially rate them on a different dichotomous variable. For example, participants would first rate the 16 photos on “good OR bad”, then on “warm OR cold”, etc.

In terms of data collection, I am hoping that participants’ categorization of each image on each variable, as well as the time (in seconds) that it takes them to make these categorizations, can be recorded.

I thank you very much for all of your time and assistance in advance, and I look extremely forward to hearing back from you!

By Dave - 4/18/2015

You basically do something along the following lines:

<expt>
/ blocks = [1-2=noreplace(hot_cold_block, good_bad_block)]
</expt>

<block hot_cold_block>
/ trials = [1-16=hot_cold_trial]
</block>

<block good_bad_block>
/ trials = [1-16=good_bad_trial]
</block>

<likert hot_cold_trial>
/ stimulusframes = [1=mypicture]
/ anchors = [1="Hot"; 2="Cold"]
/ numpoints = 2
/ position = (50%, 80%)
</likert>

<likert good_bad_trial>
/ stimulusframes = [1=mypicture]
/ anchors = [1="Good"; 2="Bad"]
/ numpoints = 2
/ position = (50%, 80%)
</likert>

<picture mypicture>
/ items = myitems
/ select = sequence
</picture>

<item myitems>
/ 1 = "image01.jpg"
/ 2 = "image02.jpg"
...
/ 16 = "image16.jpg"
</item>

(and so forth for the other 3 rating dimensions)
By Sphynx - 4/18/2015

Hi Dave,

Thank you! This looks great! Now how would I adjust the script in order to make it so that the order of the blocks are randomized, and the order of the 16 photos within each block are also randomized?
By Dave - 4/18/2015

The order of blocks is already randomized in the example I provided:

/ blocks = [1-2=noreplace(hot_cold_block, good_bad_block)]

To randomize the order of images, change <picture> element's /select attribute from "sequence" to "noreplace" :

<picture mypicture>
/ items = myitems
/ select = noreplace
</picture>
By Sphynx - 4/18/2015

Hi Dave,

Thank you! Your continued support and assistance are both very much appreciated! With your help, the script is turning out great! I just have two more questions for you.

#1. Rather than use the mouse to indicate response choices on the 2-point scale, would it be possible for me to position the two response options in the top right and top left corners of the screen, and then use the left and right arrow keys on the keyboard to indicate response choices (similar to the IAT)?

#2. Is it possible to add individual instruction pages before each block of images is presented? Currently I am using the below script for pre- and post-instructions, but I would like to notify participants of the change in block variable prior to them actually rating the images on the new block variable (i.e., general instructions --> instructions for variable #1 --> categorize 16 images on variable #1 --> instructions for variable #2 --> categorize 16 images on variable #2 --> instructions for variable #3 --> etc.)?

<expt>
/ preinstructions = (beginning)
/ blocks = [1-5=noreplace(....)]
/ postinstructions = (end)
</expt>


By Dave - 4/18/2015

Re. #1: Yes. Do it exactly as in the IAT (see the tutorials in the documentation). Set up <text> elements displaying the rating dimensions, position them as needed, display them via a <block>'s /bgstim attribute or the respective <trial>'s /stimulustimes or -frames.

Use <trial> elements instead of <likert>, use their /validresponse attributes to define the left and right arrow keys on your keyboard as response options. See the "Keyboard Scan Codes" topic in the documentation as well as Tools -> Keyboard Scancodes... for the values you need to enter.

<trial sometrial>
...
/ validresponse = (203, 205)
...
</trial>

Re. #2: Use the <block> elements' respective /pre- and /postinstructions attributes.

<block someblock>
/ preinstructions = (someblockinstructions)
...
</block>