Hello!
I am making a rapid-fire program, that autoclicks fast when the user holds the Left-mouse button down.
I usually would use GetAsyncKeyState, but since the same detects raw input, it will detect the clicks made by the program, and then continue clicking and never stop.
Example of problem:
Code:
if (GetAsyncKeyState(VK_LBUTTON))
{
mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
Sleep (10);
}
I have searched for days, and all threads said for me to use a Low-Level MouseHook, The documentation is very confusing (especially for a beginner).
How could I make this work, could someone give me an example of a mouse hook detecting left mouse to hold and return a true value to a bool variable?
Thanks for reading!
What I have tried:
GetAsyncKeyState will not work, I have tried several ways of implementing it.