INPUT input[2]{0};
input[0].type = INPUT_MOUSE;
input[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
input[1].type = INPUT_MOUSE;
input[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;
while(1){
for(int i = 0; i < 2; ++i)
SendInput(2, input, sizeof(INPUT));
Sleep(1000);
}