Get Reaction Time when mouse is invisible

Hi all,

I am developing a search task in which I’ve set the mouse cursor to be invisible at the beginning of every trial/routine. Participants have to click the mouse once to make the cursor visible and then click for the second time to indicate the location of an object. I want to get the reaction time from the beginning of the routine until first mouse click (RT1) and second mouse click (RT2). Any ideas on how to get two RTs for each mouse click, given that especially in the first mouse click the cursor is invisible?

Thanks in advance.

What does your Each Frame code currently look like?

Thanks for your prompt reply.See below.
Begin Experiment:

click=event.Mouse()

Begin Routine:

mouse_2.setPos([0,0])
click.setVisible(False)

Each Frame:

if mouse.isPressedIn(background, buttons=[0]):
    click.setVisible(True)
if mouse.isPressedIn(object,buttons=[0]):
    continueRoutine=False

According to psychopy.event - for keypresses and mouse clicks — PsychoPy v2023.2.3 you could add mouse.clickReset() after setVisible(True) and then I think rt = mouse.getPressed(getTime=True)[1] above continueRoutine=False

However, I notice that you have called the mouse object click, mouse_2 and mouse. I think you should have them all the same. I often set a mouse component in an early routine called mouse and then just refer to that throughout.

Best wishes,

Wakefield

I managed to find a workaround completely different to the one you suggested. Thank you for your time and for the advice regarding the mouse, though.