Millisecond Forums

Tracking image

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

By James Charlie - 2/27/2019

Hi,

I am trying to design a study where I can trace what image that a participant choose. I only display one image that have a number of objects and ask participants to click on object that they would like to purchase. So far, I only can tell the coordinate where they clicked on but I want the output can also provide the name of the object as well. Is there a way to do this?

Thank you.

Here is my script so far:

<values>
/percent_vertical_targety = 0
/percent_horizontal_targetx = 0
/percent_response_x = 0
/percent_response_y = 0
</values>


<picture objectpicture2>
/ items = ("object.JPG")
/ size = (100%,100%)
/ select= 1
/ position = (50%,50%)
</picture>

<trial object2>
/ stimulusframes = [1=objectpicture2]
/ timeout = (60000)
/ inputdevice = mouse
/ validresponse = (lbuttondown)
/ontrialend = [values.percent_horizontal_targetx = display.getpercentx(trial.object2.responsex)]
/ontrialend = [values.percent_vertical_targety= display.getpercenty(trial.object2.responsey)]
</trial>

<block objectblock2>
/ trials = [1-3=sequence(object2)]
</block>

<data>
/ columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum,
Values.percent_response_x, values.percent_response_y,
values.percent_horizontal_targetx, values.percent_vertical_targety)
/ separatefiles = true
</data>

By Dave - 2/27/2019

James Charlie - Wednesday, February 27, 2019
Hi,

I am trying to design a study where I can trace what image that a participant choose. I only display one image that have a number of objects and ask participants to click on object that they would like to purchase. So far, I only can tell the coordinate where they clicked on but I want the output can also provide the name of the object as well. Is there a way to do this?

Thank you.

Here is my script so far:

<values>
/percent_vertical_targety = 0
/percent_horizontal_targetx = 0
/percent_response_x = 0
/percent_response_y = 0
</values>


<picture objectpicture2>
/ items = ("object.JPG")
/ size = (100%,100%)
/ select= 1
/ position = (50%,50%)
</picture>

<trial object2>
/ stimulusframes = [1=objectpicture2]
/ timeout = (60000)
/ inputdevice = mouse
/ validresponse = (lbuttondown)
/ontrialend = [values.percent_horizontal_targetx = display.getpercentx(trial.object2.responsex)]
/ontrialend = [values.percent_vertical_targety= display.getpercenty(trial.object2.responsey)]
</trial>

<block objectblock2>
/ trials = [1-3=sequence(object2)]
</block>

<data>
/ columns = (build, computer.platform, date, time, subject, group, blockcode, blocknum, trialcode, trialnum,
Values.percent_response_x, values.percent_response_y,
values.percent_horizontal_targetx, values.percent_vertical_targety)
/ separatefiles = true
</data>


If you want to know which on-screen object was clicked on, then those objects should be in your /validresponse attribute

/ validresponse = (objectpicture2, ....)