How do I make my auto clicker randomize the ms it clicks at? I'm asking this question because I could not find any articles on this and I've been needing to get this question answered for a very long time but could not find any articles on it as I said.
Please provide me the code.
My code:
#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
cout << "\"F\" = Toggle on\n";
cout << "\"R\" = Toggle off\n\n";
bool Click = false;
while (1)
{
if (GetAsyncKeyState('F')) // Toggle on
{
Click = true;
}
if (GetAsyncKeyState('R')) // Toggle off
{
Click = false;
}
if (Click == true) // Autoclicker
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Sleep(50);
}
}
return 0;
}
I want it to click 50 to 60 ms