Currently, I am attempting to program an autoclicker that stops when the user manually clicks the left button.
int main() {
while(true)
{
Sleep(10);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0 ,0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0 ,0);
Sleep(200);
if(GetAsyncKeyState(VK_LBUTTON))
{
exit(0);
}
}
return 0;
}
As I suspected, the program stops after the first click (from the autoclicker). Is there a way the program can differentiate a click from the autoclicker and the user?