鼠标连点器

· · 科技·工程

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<map>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include <windows.h>
using namespace std;
#define ll long long
const int N=1e5+10;
const int INF=0x3f3f3f3f;
signed main(){
    //要长按 
    //priority_queue<int,vector<int>,greater<int> >q;
    //freopen("newyear.txt","w",stdout);
    while(1){
        if(GetAsyncKeyState('0'/* 按下的连点键*/)){
            mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);//模拟按下 
            Sleep(1);//不然会爆 
            mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);//模拟弹出 
            Sleep(1);
        }


    }
    return 0;
}