以前我在博客发了我的连点器1.0,其实准确的版本号是L4.66.88
现在!我隆重推出连点器2.0界面空间减小3.5倍!
![](https://i-blog.csdnimg.cn/blog_migrate/11b344a088dd3c8a7a7687ddfdc2bfce.jpeg)
先上代码!
#include <windows.h>
#include <bits/stdc++.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
void L_Down() {INPUT Input = { '0 '};Input.type = INPUT_MOUSE;Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;SendInput(1, &Input, sizeof(INPUT));}
void L_Up() {INPUT Input = {' 0 '};Input.type = INPUT_MOUSE;Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;SendInput(1, &Input, sizeof(INPUT));}
void R_Down() {INPUT Input = { '0' };Input.type = INPUT_MOUSE;Input.mi.dwFlags = MOUSEEVENTF_RIGHTDOWN;SendInput(1, &Input, sizeof(INPUT));}
void R_Up() {INPUT Input = { '0' };Input.type = INPUT_MOUSE;Input.mi.dwFlags = MOUSEEVENTF_RIGHTUP;SendInput(1, &Input, sizeof(INPUT));}
/* This is where all the input to the window goes to */
int num=0;
int sleeptime;//sleeptime[timesllllser] = 1;timesllllser++;
int timesllllser=0;
int sdjsdjsdksjdkjskdj=0;
int sdsjdsdsdsdstime =0;
int dingwei=0;
int dingweitime=0;
int fangfeng=0;
int fangfengtime=0;
int ret118=1;
int jinggouccff=0;
int dingweiok=0;
HWND h1,h2,h3,h4,h5,h6,h7,h8,h9,h11,h12,h13,h14,h15,h16,h17,h18,h19,h20,h100,h200,h111,h112,h113,h114,h115,h116,h117,h118,h119,h120,h1201,h11101,h11102,h11103,h11104,h11105,h333,hx1,hx2,hx,hb,h,b1,b2,b3;
HINSTANCE hInst;
LRESULT CALLBACK WndProc(HWND hwnd,UINT Message,WPARAM wParam,LPARAM lParam){
switch(Message){
case WM_CREATE:{
h1=CreateWindow("button","左键高速",WS_CHILD|WS_VISIBLE,
0,0,100,50,hwnd,(HMENU)1,hInst,NULL);
h2=CreateWindow("button","右键高速",WS_CHILD|WS_VISIBLE,
100,0,100,50,hwnd,(HMENU)2,hInst,NULL);
h3=CreateWindow("button","左键低速",WS_CHILD|WS_VISIBLE,
200,0,100,50,hwnd,(HMENU)3,hInst,NULL);
h4=CreateWindow("button","右键低速",WS_CHILD|WS_VISIBLE,
0,50,100,50,hwnd,(HMENU)4,hInst,NULL);
h5=CreateWindow("button","左键自定",WS_CHILD|WS_VISIBLE,
100,50,100,50,hwnd,(HMENU)5,hInst,NULL);
h6=CreateWindow("button","右键自定",WS_CHILD|WS_VISIBLE,
200,50,100,50,hwnd,(HMENU)6,hInst,NULL);
h7=CreateWindow("button","开始连点",WS_CHILD|WS_VISIBLE,
300,0,100,100,hwnd,(HMENU)7,hInst,NULL);
h8=CreateWindow("button","结束连点",WS_CHILD|WS_VISIBLE,
400,0,100,100,hwnd,(HMENU)8,hInst,NULL);
h11=CreateWindow("button","+1",WS_CHILD|WS_VISIBLE,
0,150,50,50,hwnd,(HMENU)11,hInst,NULL);
h12=CreateWindow("button","+2",WS_CHILD|WS_VISIBLE,
50,150,50,50,hwnd,(HMENU)12,hInst,NULL);
h13=CreateWindow("button","+3",WS_CHILD|WS_VISIBLE,
100,150,50,50,hwnd,(HMENU)13,hInst,NULL);
h14=CreateWindow("button","+4",WS_CHILD|WS_VISIBLE,
150,150,50,50,hwnd,(HMENU)14,hInst,NULL);
h15=CreateWindow("button","+5",WS_CHILD|WS_VISIBLE,
200,150,50,50,hwnd,(HMENU)15,hInst,NULL);
h16=CreateWindow("button","+6",WS_CHILD|WS_VISIBLE,
250,150,50,50,hwnd,(HMENU)16,hInst,NULL);
h17=CreateWindow("button","+7",WS_CHILD|WS_VISIBLE,
300,150,50,50,hwnd,(HMENU)17,hInst,NULL);
h18=CreateWindow("button","+8",WS_CHILD|WS_VISIBLE,
350,150,50,50,hwnd,(HMENU)18,hInst,NULL);
h19=CreateWindow("button","+9",WS_CHILD|WS_VISIBLE,
400,150,50,50,hwnd,(HMENU)19,hInst,NULL);
h200=CreateWindow("button","NO",WS_CHILD|WS_VISIBLE,
450,150,50,50,hwnd,(HMENU)200,hInst,NULL);
b1=CreateWindow("button",">>>",WS_CHILD|WS_VISIBLE,
250,100,100,50,hwnd,(HMENU)11881,hInst,NULL);
b2=CreateWindow("button","OK",WS_CHILD|WS_VISIBLE,
150,100,100,50,hwnd,(HMENU)11882,hInst,NULL);
h11103=CreateWindow("button","定位连点开/关",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
h119=CreateWindow("button","你选的连点方式:无",WS_CHILD|WS_VISIBLE,
0,100,150,50,hwnd,(HMENU)0,hInst,NULL);
break;
}
case WM_COMMAND:{
switch(wParam){
case 999:{
if(jinggouccff==0){
h11103=CreateWindow("button","定位连点开/关",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
else if(jinggouccff==1){
h11103=CreateWindow("button","防查封开/关",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
else if(jinggouccff==2){
h11103=CreateWindow("button","防封设置间隔",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
break;
}
case 11881:{
if(jinggouccff==0){
jinggouccff=1;
h11103=CreateWindow("button","防查封开/关",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
else if(jinggouccff==1){
jinggouccff=2;
h11103=CreateWindow("button","防封设置间隔",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
else if(jinggouccff==2){
jinggouccff=0;
h11103=CreateWindow("button","定位连点开/关",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
break;
}
case 11882:{
if(jinggouccff==0){
if(fangfeng==0){
if(dingwei==1){
dingwei=0;
MessageBox(GetForegroundWindow(),"已关闭","c++",0);
}
else{
dingwei=1;
MessageBox(GetForegroundWindow(),"已开启","c++",0);
}
}
else{
MessageBox(GetForegroundWindow(),"请先关闭防封","c++",0);
}
}
else if(jinggouccff==1){
if(dingwei==0){
if(fangfeng==0){
fangfeng=1;
MessageBox(GetForegroundWindow(),"已开启1","c++",0);
}
else{
fangfeng=0;
MessageBox(GetForegroundWindow(),"已关闭1","c++",0);
}
}
else{
MessageBox(GetForegroundWindow(),"请先关闭定位,然后设置低速","c++",0);
}
}
else if(jinggouccff==2){
int x=MessageBox(GetForegroundWindow(),"间隔大-点击是,间隔中-点击否,间隔小-点击取消","c++",3);
cout<<x;
if(x==6){
fangfengtime==1;
}
else if(x==7){
fangfengtime==2;
}
else{
fangfengtime==3;
}
}
if(jinggouccff==0){
h11103=CreateWindow("button","定位连点开/关",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
else if(jinggouccff==1){
h11103=CreateWindow("button","防查封开/关",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
else if(jinggouccff==2){
h11103=CreateWindow("button","防封设置间隔",WS_CHILD|WS_VISIBLE,
350,100,150,50,hwnd,(HMENU)999,hInst,NULL);
}
break;
break;
}
case 1:{
cout<<"1";
sdjsdjsdksjdkjskdj =1;
h119=CreateWindow("button","你选的连点方式:左键高速",WS_CHILD|WS_VISIBLE,
0,100,150,50,hwnd,(HMENU)0,hInst,NULL);
break;
}
case 2:{
cout<<"2";
sdjsdjsdksjdkjskdj =2;
h119=CreateWindow("button","你选的连点方式:右键高速",WS_CHILD|WS_VISIBLE,
0,100,150,50,hwnd,(HMENU)0,hInst,NULL);
break;
}
case 3:{
cout<<"3";
sdjsdjsdksjdkjskdj =3;
h119=CreateWindow("button","你选的连点方式:左键低速",WS_CHILD|WS_VISIBLE,
0,100,150,50,hwnd,(HMENU)0,hInst,NULL);
break;
}
case 4:{
cout<<"4";
sdjsdjsdksjdkjskdj =4;
h119=CreateWindow("button","你选的连点方式:右键低速",WS_CHILD|WS_VISIBLE,
0,100,150,50,hwnd,(HMENU)0,hInst,NULL);
break;
}
case 5:{
cout<<"5";
h119=CreateWindow("button","你选的连点方式:左键自定",WS_CHILD|WS_VISIBLE,
0,100,150,50,hwnd,(HMENU)0,hInst,NULL);
MessageBox(GetForegroundWindow(),"请输入延迟时间","c++",0);
sdjsdjsdksjdkjskdj =5;
break;
}
case 6:{
cout<<"6";
h119=CreateWindow("button","你选的连点方式:右键自定",WS_CHILD|WS_VISIBLE,
0,100,150,50,hwnd,(HMENU)0,hInst,NULL);
MessageBox(GetForegroundWindow(),"请输入延迟时间","c++",0);
sdjsdjsdksjdkjskdj =6;
break;
}
case 7:{
if(dingwei==0&&fangfeng==0){
cout<<"7";
}
if( sdjsdjsdksjdkjskdj ==0){
MessageBox(GetForegroundWindow(),"你没有选择启动项","c++",0);
}
else{
MessageBox(GetForegroundWindow(),"已启动","c++",0);
if(dingwei==0){
//TODO
if(sdjsdjsdksjdkjskdj ==1){
while(sdjsdjsdksjdkjskdj!=0){
//TODO
L_Down();
L_Up() ;
}
}
else if(sdjsdjsdksjdkjskdj ==2){
//TODO
while(sdjsdjsdksjdkjskdj!=0){
//TODO
R_Down();
R_Up() ;
}
}
else if(sdjsdjsdksjdkjskdj ==3){
//TODO
while(sdjsdjsdksjdkjskdj!=0){
//TODO
L_Down();
L_Up() ;
Sleep(30);
}
}else if(sdjsdjsdksjdkjskdj ==4){
//TODO
while(sdjsdjsdksjdkjskdj!=0){
//TODO
R_Down();
R_Up() ;
Sleep(30);
}
}else if(sdjsdjsdksjdkjskdj ==5){
while(sdjsdjsdksjdkjskdj!=0){
//TODO
L_Down();
L_Up() ;
Sleep(sleeptime);
}
}else if(sdjsdjsdksjdkjskdj ==6){
while(sdjsdjsdksjdkjskdj!=0){
//TODO
R_Down();
R_Up() ;
Sleep(sleeptime);
}
}
}
else if(dingwei==1){
cout<<"78";
if( sdjsdjsdksjdkjskdj ==0){
MessageBox(GetForegroundWindow(),"你没有选择启动项","c++",0);
}
else{
MessageBox(GetForegroundWindow(),"已启动","c++",0);
}
if(sdjsdjsdksjdkjskdj ==1){
while(sdjsdjsdksjdkjskdj!=0){
int b=dingweitime;
if(KEY_DOWN(MOUSE_WHEELED)){
dingweiok=1;
for(int i=0;i<100;i++){
//TODO
L_Down();
L_Up();
}
}
//TODO
}
}
else if(sdjsdjsdksjdkjskdj ==2){
//TODO
while(sdjsdjsdksjdkjskdj!=0){
int b=dingweitime;
if(KEY_DOWN(MOUSE_WHEELED)){
dingweiok=1;
for(int i=0;i<100;i++){
//TODO
R_Down();
R_Up();
}
}
}
}
else if(sdjsdjsdksjdkjskdj ==3){
//TODO
while(sdjsdjsdksjdkjskdj!=0){
int b=dingweitime;
if(KEY_DOWN(MOUSE_WHEELED)){
dingweiok=1;
for(int i=0;i<100;i++){
L_Down();
L_Up() ; Sleep(30);
} //TODO
}
}
}else if(sdjsdjsdksjdkjskdj ==4){
//TODO
while(sdjsdjsdksjdkjskdj!=0){
if(KEY_DOWN(MOUSE_WHEELED)){
dingweiok=1;
for(int i=0;i<100;i++){
R_Down();
R_Up() ; Sleep(30);
} //TODO
} //TODO
}
}
else if(sdjsdjsdksjdkjskdj ==5){
while(sdjsdjsdksjdkjskdj!=0){
int b=dingweitime;
if(KEY_DOWN(MOUSE_WHEELED)){
dingweiok=1;
for(int i=0;i<100;i++){
L_Down();
L_Up() ; Sleep(sleeptime);
} //TODO
}
}
}else if(sdjsdjsdksjdkjskdj ==6){
while(sdjsdjsdksjdkjskdj!=0){
//TODO
int b=dingweitime;
if(KEY_DOWN(MOUSE_WHEELED)){
dingweiok=1;
for(int i=0;i<100;i++){
//TODO
R_Down();
R_Up(); Sleep(sleeptime);
}
}
}
}
break;
//TODO
}
else if(fangfeng==1){
if( sdjsdjsdksjdkjskdj==3){
if(fangfengtime==0||fangfengtime==1){
while(sdjsdjsdksjdkjskdj!=0){
int y=rand()%30;
srand(time(0));
L_Down();
L_Up();
Sleep(y+30);
}
}else if(fangfengtime==2){
while(sdjsdjsdksjdkjskdj!=0){
int y=rand()%20;
srand(time(0));
L_Down();
L_Up();
Sleep(y+30);
}
}else{
while(sdjsdjsdksjdkjskdj!=0){
int y=rand()%10;
srand(time(0));
L_Down();
L_Up();
Sleep(y+30);
}
}
}
}
}
}
case 8:{
cout<<"8";
sdjsdjsdksjdkjskdj =0;
MessageBox(GetForegroundWindow(),"已停止","c++",0);
break;
}
case 11:{
cout<<"11";
sleeptime=sleeptime+1;
break;
}
case 12:{
cout<<"12";
sleeptime=sleeptime+2;
break;
}
case 13:{
cout<<"13";
sleeptime=sleeptime+3;
break;
}
case 14:{
cout<<"14";
sleeptime=sleeptime+4;
break;
}
case 15:{
cout<<"15";
sleeptime=sleeptime+5;
break;
}
case 16:{
cout<<"16";
sleeptime=sleeptime+6;
break;
}
case 17:{
cout<<"17";
sleeptime=sleeptime+7;
break;
}
case 18:{
cout<<"18";
sleeptime=sleeptime+8;
break;
}
case 19:{
cout<<"19";
sleeptime=sleeptime+9;
break;
}
case 20:{
cout<<"20";
sleeptime=sleeptime+10;
break;
}
case 200:{
cout<<"200";
sleeptime=0;
MessageBox(GetForegroundWindow(),"已清零","c++",0);
break;
}
break;
}
default:{
DefWindowProc(hwnd,Message,wParam,lParam);
break;
}
}
}
}
/* The 'main' function of Win32 GUI programs: this is where execution starts */
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
hInst=hInstance;
WNDCLASSEX wc; /* A properties struct of our window */
HWND hwnd; /* A 'HANDLE', hence the H, or a pointer to our window */
MSG msg; /* A temporary location for all messages */
/* zero out the struct and set the stuff we want to modify */
memset(&wc,0,sizeof(wc));
wc.cbSize = sizeof(WNDCLASSEX);
wc.lpfnWndProc = WndProc; /* This is where we will send messages to */
wc.hInstance = hInstance;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
/* White, COLOR_WINDOW is just a #define for a system color, try Ctrl+Clicking it */
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.lpszClassName = "WindowClass";
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); /* Load a standard icon */
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); /* use the name "A" to use the project icon */
if(!RegisterClassEx(&wc)) {
MessageBox(NULL, "Window Registration Failed!","Error!",MB_ICONEXCLAMATION|MB_OK);
return 0;
}
hwnd = CreateWindowEx(WS_EX_CLIENTEDGE,"WindowClass","Caption",WS_VISIBLE|WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, /* x */
CW_USEDEFAULT, /* y */
510, /* width */
230, /* height */
NULL,NULL,hInstance,NULL);
if(hwnd == NULL) {
MessageBox(NULL, "Window Creation Failed!","Error!",MB_ICONEXCLAMATION|MB_OK);
return 0;
}
while(GetMessage(&msg, NULL, 0, 0) > 0) { /* If no error is received... */
TranslateMessage(&msg); /* Translate key codes to chars if present */
DispatchMessage(&msg); /* Send it to WndProc */
}
return msg.wParam;
}
这就是2.0了看一下效果!