0
Making Mouse1 Pressed Without Physically Pressing
I mean, how can make left mouse button clicked in code without physically I press left mouse button. Also, one more thing, what actually happens when we press MOUSE1 or MOUSE2 and how does computer understand that we pressed something on keyboard or mouse?
1 ответ
+ 1
#include <windows.h>
#include <winable.h>
int main()
{
while(true)
{
while(GetAsyncKeyState('Q'))
{
INPUT Input={0};
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
::SendInput(1,&Input,sizeof(INPUT));
Sleep(10);
::ZeroMemory(&Input,sizeof(INPUT));
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
::SendInput(1,&Input,sizeof(INPUT));
Sleep(10);
}
}
}
When u click mouse i can hear "Click" and when u press button on keyboard... hmm u can't hear anything xD lol xDDDDDDDDDDDDDD
Meow :3
This code above will send click for u without clicking xD
lel u can click by pressing Q :D ! WUUUUUUU xD
but srsly nothing special is happening when u click :P
just electricy is moving xDD
y i know my english is great !
btw i luf cats <3 ! :3 lel meow ! xD