How to repeat the mouse action?

I need after clicking the left mouse button in the modal operator to repeat the mouse click. The first press will be on the button, after this button disappears and I need to select vertex, edge or face behind it

Blender can simulate events, but if I’m not mistaken you have to start blender with a specific flag to enable it since it’s only meant for unit testing. Probably better to just do what the second click would do, but manually ( has a location property for example)

1 Like

it seems this worked for me, choice case not always precise, but perhaps this me it looked.
in the modal operator I added the following lines

if event.type == 'TIMER':, self.init_mouse_y))

I not know why but under work with vs code works upper code, i.e. clicking on returns timer. But when you run the blender without vs code, you need the following code to initialize the click.

if event.type == 'LEFTMOUSE' and event.value == 'RELEASE':, self.init_mouse_y))

It is of course logical, but why in vs code obtained by pressing event.type = ‘TIMER’?

Anyway, Thank you)

Do not tell me how to track the click on the timer. For example I hold the mouse for a second and should trigger a certain action?