Is it possible to track the x,y coordinates of mouse movement?


Author
Message
ssulli26
ssulli26
Respected Member (356 reputation)Respected Member (356 reputation)Respected Member (356 reputation)Respected Member (356 reputation)Respected Member (356 reputation)Respected Member (356 reputation)Respected Member (356 reputation)Respected Member (356 reputation)Respected Member (356 reputation)
Group: Forum Members
Posts: 1, Visits: 1

Does anyone know of a way to track mouse movement for an extended period of time within an inquisit script?


seandr
seandr
Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)
Group: Administrators
Posts: 1.3K, Visits: 5.6K

No, this isn't currently possible (although you can tell if the user clicks on a particular stimulus located on the screen).


Can you provide more details about what you'd need here? I've got plans to implement continuous output recording in a future release, so it would be great to hear your requirements.


Regards,
Sean


marci
marci
Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)
Group: Forum Members
Posts: 9, Visits: 1
It would be really good if I could output the x,y position of the mouse click into the data file.
seandr
seandr
Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)
Group: Administrators
Posts: 1.3K, Visits: 5.6K

Can you say a little more about what kind of task you are running and how you would use x,y coordinates? 


For example, do you simply want to record the latency and position of the mouse at the time the subject clicks one of the mouse buttons? Or do you want to record a continuous stream of x,y coordinates during a trial? Or something else altogether?


Thanks,
Sean


joebodle
joebodle
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 8, Visits: 1

Hello Sean,


I am trying to create a Visual Analogue Scale. There are a couple of ways to do this. The way we would like to do this is to display a picture of this scale (which has a color gradient) and record the position on the screen where the participant clicks (the X,Y coordinates). We cannot use the sliding scale because it starts people in the middle, and we are recording latency as well.


Is it possible to record the x,y coordinates of a click and the response latency?


I am using Inquisit 3.0


Thank you,


Joe


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

See the sample script I posted in this thread: http://www.millisecond.com/forums/Topic2345.aspx. You should be able to adapt it to your needs fairly easily.


~Dave


joebodle
joebodle
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 8, Visits: 1

Hi Dave,


Thanks for responding so quickly. We have the VisualAnlogueScale syntax; this syntax records where on a shape participants click. However we would still like to know if it is possible to just record the x,y coordinates where the participant clicks on a screen? Or, if not, is it possible to record where participants click on a picture (not a shape)?


Thanks again,


Joe




Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

The script of course does track mouse coordinates as you can see in the <expressions>. Anyway, you need to look up the documentation on the responsex and responsey properties.


joebodle
joebodle
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 8, Visits: 1

Hi again Dave,


I have looked up documentation on responsex and responsey. Thanks for the tip, but I'm still having an issue. I'm trying to use a picture (instead of the shape that you used) as the visual analogue scale. When I try to run the block, I am still able to use it like when it was a shape, but it will not record the either the x or y coordinates. When I ran the monkey it did record the data but with no coordinates. I used your template and noticed that it was only recording the data with a monkey run as well (without changing any of your code) and not when I went through the trials myself.


By the way. I'm using this the picture (instead of a shape) because i need a color gradient for the response scale itself.


I hope this isn't too confusing. I also apologize if my lack of knowledge with this language becomes frustrating to you.


Thanks again,


Joe


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

To actually record the x,y coordinates, you have to modify the <data> element. The VAS script only records a percentage score adjusted for different screen resolutions, etc.. If you use a shape or a picture as your scale doesn't make any difference. Consider this simplified sample code:


<values>
/ x = 0
/ y = 0

</values>

<trial mytrial>
/ stimulusframes = [1=blackblock]
/ inputdevice = mouse
/ validresponse = (blackblock)
/ ontrialend = [values.x=trial.mytrial.responsex;values.y=trial.mytrial.responsey]
</trial>

<shape blackblock>
/ shape = rectangle
/ color = (black)
/ size = (400px,100px)
</shape>

<block myblock>
/ trials = [1-10=mytrial]
</block>

<data>
/ columns = [date,time,subject,trialnum,trialcode,latency,response,values.x,values.y]
</data>


Regards,


~Dave


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search