一个鼠标连点器,肯定会用到mouse_event功能,设置好开始结束键,第一个参数写操作,接下来四个填0就行,示例代码中按住右Ctrl键连点,放开停止
#include <cstdio>
#include <windows.h>
int main(void){
printf("Press the right ctrl to click.");
while(true)
while(GetAsyncKeyState(VK_RCONTROL))
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP,0,0,0,0);
return 0;
}