Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Mousetrap problem recording coordinates

Hi

I am trying to create an experiment whereby I can record the coordinates of the mouse cursor whilst participants watch a short video clip. In order to do this was hoping to use the Mousetrap plugin. Underneath the video is a scale from negative to neutral to positive. By moving the cursor over the scale participants should indicate their current emotional state. I aim to record the timestamp and position of the cursor on the X Axis though out the video. However, in the log file it only records the time stamp, the x_pos and y_pos columns remain empty. Does anyone know how to fix this?

Kind Regards

Ian

Comments

  • It is also worth noting that the logger item is after the mousetrap item.

  • Hi Ian,

    to answer your question, it would be great if you could provide some additional information:

    Which item/plugin are you using for displaying the video?
    How did you create the scale below the video?
    Which mousetrap item are you using - mousetrap_response?

    The main challenge will be to record the coordinates while the video is running. Depending on your answers to the questions above, it might not be possible to do this using the mousetrap_response item because it cannot be run in parallel to the item that plays the video.

    If you are using the media player mpy item for displaying the video, you might be able to solve this challenge using the custom python code option provided by the media player mpy item. Note that I haven't used this item myself, so I don't know exactly how the specific implementation would look like in this case.

    Best,

    Pascal

  • Hi Pascal

    Thank you for your reply. I am using the media player mpy plugin to display the video. In order to implement the scale we have simply edited the video itself and inserted a scale. I am currently using the mousetrap response item. Which is place after the media player plugin.

    Any assistance you can offer we would be most grateful.

    All the best

    Ian

  • Hi Ian,

    it is I think not possible to combine the media player mpy item with mousetrap as you cannot run mousetrap concurrently with the media player mpy item.

    However, as mentioned above you could use the custom python code option provided by the media player mpy item itself. The documentation for the plugin (which is developed by @Daniel Schreij) can be found in the offline help of the plugin or here. I think the general idea would be to set the setting "Call custom Python code" to "after every frame" and then to continuously get the mouse position (see OpenSesame's online documentation) and store it in a list. However, I haven't used the media player mpy item before so this is just a guess on my part and you would have to try it out yourself.

    Best,

    Pascal

  • Dear Pascal
    Thank you very much for your advice. I created a custom python code within the media_player_mpy. This works very well.

    All the best

    Ian

Sign In or Register to comment.