跳到正文

个人记录

C++的连点器

GusyNight约 1 分钟
原文
文章信息与版本

文章信息

发布
2019年9月7日
收录
2025年12月12日
更新
2026年11月10日
篇幅
约 1 分钟

版本

  1. v1当前
C++
#include<windows.h> 
#include<winuser.h> 
#include<bits/stdc++.h> 
#define int long long
using namespace std; 
signed main(){ 
    while(true){
    	cout<<"输入1启动连点:"<<endl;int kkk=0;cin>>kkk;
    	if(kkk!=1)return 0;
    	cout<<"请输入连点的次数:"<<endl;int n;cin>>n;
    	cout<<"5秒后启动连点"<<endl; Sleep(5000); 
    	for (int i=1;i<=n;i++){ 
        	mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0); 
    	}
    	cout<<"3秒后可以再次使用!"<<endl;
		Sleep(3000);system("cls");
    }
    //::SetCursorPos(10,10); 
    return 0;
}
原文