So my AutoClicker code below detects if the mouse button is pressed and simulates clicking so in a game you can hold down the mouse button and it'll click for you. The only problem is that it detects for the LBUTTON to be down and then simulates the LBUTTON being down so it doesn't stop when you let go of the mouse button. Is there a way to change VK_LBUTTON to only activate if its held for more than 1 second or something so the simulated mouse clicks don't keep it on a loop?