-----------------------------------------------------
Edit: oh my bad I misread your reply. Above is for if you want to activate something when clicking inside a certain area /
Found this after 2 seconds of googling. I bet your homepage is google and you don't even know how or when to use it.
[php]
void LeftClick ( )
{
INPUT Input={0};
// left down
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
::SendInput(1,&Input,sizeof(INPUT));
// left up
::ZeroMemory(&Input,sizeof(INPUT));
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
::SendInput(1,&Input,sizeof(INPUT));
}
[/php]
Originally Posted by Void
Found this after 2 seconds of googling. I bet your homepage is google and you don't even know how or when to use it.
[php]
void LeftClick ( )
{
INPUT Input={0};
// left down
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
::SendInput(1,&Input,sizeof(INPUT));
// left up
::ZeroMemory(&Input,sizeof(INPUT));
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
::SendInput(1,&Input,sizeof(INPUT));
}
[/php]
I don't think he can understand us since he seems new to coding.
No, I need mouse to automatically click on a certain location.
Originally Posted by ipwnuuaal5
No, I need mouse to automatically click on a certain location.
I think you should read over my 2 posts and don't judge too quickly. The structure used in the SendInput has more members, that include the x and y coordinates of the mouse.
You should really do some research on your own before posting here. It could really save us all the trouble of going through this meaningless attempt at helping someone that obviously doesn't know programming what so ever, if you did research before posting, you could've figured that out yourself.
ok thanks void.
i did my research
this is how you do it.
mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
SetCursorPos(..)
or
mouse_event(...)
GetAsyncKeyState(VK_LBUTTON) = true;
Originally Posted by topblast
GetAsyncKeyState(VK_LBUTTON) = true;
You cannot SET the value in a GET statement.
Originally Posted by ipwnuuaal5
How can you code a mouse click in game for a certain position?
SetCursorPos(x,y);
I think that is it. I havent use that since my color aimbot
Originally Posted by freedompeace
You cannot SET the value in a GET statement.
well what do u kno.. u learn something every day( i was just kidding i knew u could not do it like that)