Mouse - how do you make it click?

How would you make the mouse simulate a click by script?
For some reason, when I try to switch Screen.lockCursor to true and false, it needs a click to activate.

I found this website, but it didn’t say anything about the mouse.

oh, I don’t think tat uses unity, nvm.