Advanced Autoclicker HELP

I need help doing this. I am trying to use the GetQueueStatus() to see if a certain message is in the queue, and if there is a WM_LBUTTONDOWN message in the queue. I want it to say "hey". I tried to do hooks, but the problem is it lags the mouse queue so the cursor is sluggish af. This should work as far as I understand, but it doesn't. If I set the command equal to 0 meaning there is nothing in the mouse filter it prints hey. I assumed once something is in the mouse filter it wouldn't be equal to 0 anymore and I could use that, but I guess not. I am stomped, and I have been for awhile on how to do this.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <Windows.h>
#include <iostream>

using namespace std;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    while (0==0) {
    MSG msg;
    if (GetQueueStatus(QS_MOUSEBUTTON | WM_LBUTTONDOWN) != 0) {
    cout << "hey";
    }
    }
    }
Last edited on
How should this work? You don't have a window that can receive any windows message.
This doesn't work. I assume that the debug console just receives the message because if I write the code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <Windows.h>
#include <iostream>

using namespace std;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    while (0==0) {
    MSG msg;
    if (GetQueueStatus(QS_MOUSEBUTTON | WM_LBUTTONDOWN) == 0) {
    cout << "hey";
    }
    }
    }

It works. It knows that there is not a WM_LBUTTONDOWN message in the filter, so it prints "hey." I just need to find a way to make it work when the UNIT flags is not set to 0. It should work how I did it originally, but clearly I am doing something wrong. I can't figure it out though. I am trying to because I just want to get this down, but I cannot.
Last edited on
Don't bother commenting on this because It just occurred to me i can't use this command for what i want because the value does not go back to 0 once i let go of the leftmousebutton
Topic archived. No new replies allowed.