detect mouse up or down

Hey,
I am currently making an autoclicker that activates when the left mouse button is held down and stops when it is let go.

The code used to activate the clicking mechanism when the R key is was pressed and then stop it when it was pressed again.

This code below activates the clicker when I hold down the left mouse button but I don't know how to detect when it is let go and it just keeps clicking.

1
2
3
4
if((GetKeyState(VK_LBUTTON) & 0x100) != 0)
                {
                    goto start;
                }


Last edited on
Are you using any external libraries to detect mouse clicks?
Can you post the entire code, so it's easier to see what's going on?

goto start; You'll be advised by a lot, not to use that sort of logic.
Instead try to use loops and switches, they are much more reliable!
Topic archived. No new replies allowed.