title: I am making an autoclicker, and I need to customize it to click only when I hold the mouse key down
body: <p>I would go into Codeblocks, and I would simply put something like this.</p>
  
  <pre><code>while (GetAsyncKeyState(VK_LBUTTON) {
   mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
   mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
  }
  </code></pre>
  
  <p>The problem with this code is: It keeps sending LButton, so the program continues, and it doesn't stop clicking. I was wondering if there is a way to differentiate between real mouse clicks and virtual mouse clicks.</p>