1

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?

Jive Dadson
  • 16,680
  • 9
  • 52
  • 65
Eric Ko
  • 11
  • 1

0 Answers0