Howdy, Stranger!

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

Supported by

Problem visualizing the mouse while presenting stimuli and collecting mouse clicks.

I am collecting mouse clicks using an inline script during stimulus presentation.
The script looks something like this:
while elapsed_time < Timeout:
my_mouse.flush()
my_mouse.show_cursor(show='true')
button, position, clicktime = my_mouse.get_click(timeout=Timeout - elapsed_time)
........
The reason I flush the mouse is that was the only way I managed to get the clicks I wanted in each cycle of the "while" loop, and I added my_mouse.show_cursor(show='true') because I thought the flush changes the definition that the cursor should show.

What happens is that a stimulus is presented, for a short flash you can see the mouse, and then it disappears until you click on the stimulus somewhere... then it reappears for a short flash and disappears again...

My final goal is to record mouse clicks on a stimulus presented but the subjects need to see the cursor to know where they are pressing.

THANKS!!

Comments

  • Hi,

    Can you try replacing my_mouse.show_cursor(show='true') with my_mouse.set_visible(True)?

    Eduard

    Buy Me A Coffee

  • Thank you so much!!!
    I searched the internet for such a long time and didn't see that option in any explanation...
    do you know where I can find such info in the future?

    Best regards,
    Carmel

  • Normally, the manual page (osdoc.cogsci.nl) is the place to look. But for some reason the function set_visible() is not mentioned there. If you can't find info there, just browse the forum (or ask a question).

    Buy Me A Coffee

  • hi everyone, hi @eduard,

    this is a bit of a different problem but since it has to do with mouse response visibility, I'm posting it here:

    What I need to implement is to show the position of a mouse click when recording it:

    In a rating task, participants are asked to select a coordinate based on how far they go on the x- and y-axis with the mouse cursor. Having some experience with OS, we set this up successfully (yeah!). I attached the experiment draft as is:

    Now because there is no image that the mouse response could select, and because the task is a bit weird without seeing where they clicked, we want the "spot" that was clicked on the spreadsheet to become and remain visible on screen until they proceed to the next item. It could be an X or dot or the coordinate pixel/square being colored, just any visible instant feedback to participants on where exactly they clicked.

    Is there a code snippet similar to my_mouse.set_visible(True) but for the respective mouse response on screen?

    We gave each coordinate a name to later identify the area, if that helps to select and show it for their response.

    Hope someone here knows how to do the trick!

    Best,

    Christin

Sign In or Register to comment.