版本比较
键盘 V2.4.ty
正文
增加 69 行删除 56 行
12 行未改动131415161718171819202122232425252627282926 行未改动5657585960606162626364656612 行未改动798081828383848586874 行未改动92939495969697989910010010110210210310410510610710710810911011111211311411511511611711811811912012112268 行未改动1911921931941951951961971981995 行未改动2052062072082092102112122132092102112122132142152162172182192202212222232242252262272282152162172292302312322192332342212352362372382392402412422432442312322452462472482492362372502512522532542552562572442582592602612622632642512652662532542672682692702712582722732742752765 行未改动2822832842852722862872882892902912922932802942952822962972982993009 行未改动3103113123133003143153023163173183193203213083093103113223233243253263133273283153293303313323193333343353363373 行未改动3413423433443313453463333473483493503512 行未改动3543553563573443453583593603613483623633503643653663673543683693703713723733743613753763773783799 行未改动38939039139237939339439539639739839940040140238940340440540640736 行未改动4444454464474344484494504514384524534544553 行未改动12 行未改动#define space VK_SPACE#define mouse_l VK_LBUTTON#define mouse_r VK_RBUTTON#define mouse_m VK_MBUTTON#define shift VK_SHIFT #define control VK_CONTROL #define shift VK_SHIFT#define control VK_CONTROL#define soh GetStdHandle(STD_OUTPUT_HANDLE)#define sih GetStdHandle(STD_INPUT_HANDLE)#define scta(x) SetConsoleTextAttribute(soh,(x))#define fgis FOREGROUND_INTENSITY#define lp key(mouse_l)#define nukecheck if(nukeflag) continueusing namespace std; using namespace std;queue<double>q;double s,maxc,cps,mode;const string dc="cyan";const string pc="violet";26 行未改动 Sleep(100); } UnhookWindowsHookEx(hook);}POINT getpos(){//获取鼠标位置 POINT getpos(){//获取鼠标位置 HWND hwnd = GetConsoleWindow(); SetWindowLongPtr(hwnd, GWL_EXSTYLE, SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_NOACTIVATE); HWND consoleHWND = GetConsoleWindow(); RECT rect; POINT ret;12 行未改动 } return;}void move(int x,int y){SetCursorPos(x,y);}void click_check(){ //点击速度的计算(检测点击 void click_check(){ //点击速度的计算(检测点击 while(1){ Sleep(20); if(key(mouse_l)||key(mouse_r)||key(mouse_m)){ while((key(mouse_l)||key(mouse_r)||key(mouse_m)));4 行未改动void presskey(int keyCode) { //按下某个按键并松开 keybd_event(keyCode, 0, 0, 0); keybd_event(keyCode, 0, KEYEVENTF_KEYUP, 0);}void go(int col,int line){//光标去到某位置 void go(int col,int line){//光标去到某位置 COORD p; p.X=col; p.Y=line; SetConsoleCursorPosition(soh,p); SetConsoleCursorPosition(soh,p);}void color(int front,int behind=0){//调整颜色 void color(int front,int behind=0){//调整颜色 //0 = 黑色 2 = 绿色 14 = 淡黄色 15 = 亮白色 WORD wColor=((behind&0x0F)<<4)+(front&0x0F); scta(wColor);}void setcolor(string str){//调整字体颜色 void setcolor(string str){//调整字体颜色 if(str=="lightblue") scta(fgis|1); if(str=="lightred") scta(fgis|FOREGROUND_RED); if(str=="violet") scta(fgis | FOREGROUND_RED | FOREGROUND_BLUE); if(str=="cyan") scta(fgis | FOREGROUND_GREEN | FOREGROUND_BLUE); if(str=="blue") scta(FOREGROUND_BLUE); if(str=="red") scta(FOREGROUND_RED); if(str=="yellow") scta(FOREGROUND_RED | FOREGROUND_BLUE); else return; else return;}
namespace std{ //所有常量 namespace std{ //所有常量 const int poss[][5]={{11,45,14}, {60,75,129,127},{130,75,182,127},{183,75,240,127},{241,75,297,127}, {298,75,353,127},{354,75,410,127},{60,140,145,190},{146,140,202,190}, {203,140,258,190},{259,140,314,190},{315,140,370,190},{60,200,123,255},68 行未改动 exit(3211574514); }};
void back_keyboard(){ //绘制键盘底板 void back_keyboard(){ //绘制键盘底板 int sleeptime=10; color(0,0); system("cls"); setcolor(dc);5 行未改动 go(57,i); print(mouseimage[i-5],7); } setcolor(pc); go(4,1); print("这是一个好东西,按F9调整连点模式,按F10关闭屏幕键盘",sleeptime); go(4,15); print("连点器使用指南:按Shift+滚动鼠标滚轮 调整点击速度:>",sleeptime); go(46,7); print("作者:",sleeptime); go(46,8); print("tttyyygdgz",sleeptime); go(46,9); print("daniel08",sleeptime); go(4,1); print("这是一个好东西,按F9调整连点模式,按F10关闭屏幕键盘",sleeptime); go(4,15); print("连点器使用指南:按Shift+滚动鼠标滚轮 调整点击速度:>",sleeptime); go(46,7); print("作者:",sleeptime); go(46,8); print("tttyyygdgz",sleeptime); go(46,9); print("daniel08",sleeptime); go(55,2); print("ClickSpeed:10",sleeptime); go(54,3); print("----------------",sleeptime); go(55,4); print("Autoclick:Close",sleeptime); go(61,12); print("0.0",sleeptime); go(57,14); print("Max-Cps:0",sleeptime); setcolor(dc); go(60,15); print("[清除]",sleeptime); color(13,11); for(int i=0;i<=16;i++){ go(73,i); cout<<(i!=8?" ":"←"); Sleep(sleeptime); }
}void init(){// 初始化 //步骤1:禁止焦点监测(点击时不获得焦点) void init(){// 初始化
//步骤1:禁止焦点监测(点击时不获得焦点) HWND hwnd = GetConsoleWindow(); SetWindowLongPtr(hwnd,GWL_EXSTYLE, SetWindowLongPtr(hwnd,GWL_EXSTYLE, GetWindowLongPtr(hwnd,GWL_EXSTYLE)|WS_EX_NOACTIVATE); //步骤2:设置窗口大小和位置 //步骤2:设置窗口大小和位置 SetWindowPos(hwnd,0,0,0,0,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_FRAMECHANGED); system("mode con cols=76 lines=17"); CONSOLE_CURSOR_INFO cursor_info={1,0}; SetConsoleCursorInfo(soh,&cursor_info); HWND hWnd=GetForegroundWindow(); LONG style=GetWindowLong(hWnd,GWL_EXSTYLE); SetWindowLong(hWnd,GWL_EXSTYLE,style|WS_EX_TOPMOST);// SetWindowPos(hWnd,HWND_TOPMOST,0,GetSystemMetrics(SM_CYFULLSCREEN)-230,0,0,SWP_NOSIZE); SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE); //步骤3:取消快速编辑 SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE); //步骤3:取消快速编辑 DWORD mode; GetConsoleMode(sih,&mode); mode&=~ENABLE_QUICK_EDIT_MODE; SetConsoleMode(sih,mode); SetConsoleMode(sih,mode);
hWnd=GetConsoleWindow(); LONG_PTR exStyle=GetWindowLongPtr(hWnd,GWL_EXSTYLE); SetWindowLongPtr(hWnd,GWL_EXSTYLE,exStyle|WS_EX_LAYERED); BYTE alpha=255; SetLayeredWindowAttributes(hWnd,0,alpha,LWA_ALPHA);}bool checkpos(int x1,int y1,int x2,int y2){// 检查鼠标位置 bool checkpos(int x1,int y1,int x2,int y2){// 检查鼠标位置 GetCursorPos(&pos); POINT Winpos=curpos; int x=pos.x-Winpos.x; int y=pos.y-Winpos.y; if(x>=x1&&x<=x2&&y>=y1&&y<=y2){ return 1; } } return 0;} void getpress(){//获得键盘按下情况 }void getpress(){//获得键盘按下情况 memset(cases,0,sizeof cases); for(int i=1;i<=13;i++){cases[i]=checkpos(poss[i][0],poss[i][1],poss[i][2],poss[i][3]);}}void printkey(int row,int col,const string str[]){//行row,列col void printkey(int row,int col,const string str[]){//行row,列col go(row,col); for(int i=0;i<4;i++){ cout<<str[i]; go(row,++col);5 行未改动 color(0,0); system("cls"); system("mode con cols=17 lines=17"); setcolor(pc); go(6,1);cout<<"选择功能"; go(6,1);cout<<"选择功能"; } else if(nukeflag==1){ nukeflag=0; system("mode con cols=76 lines=17"); back_keyboard(); }}void Main(){// 次主程序 void Main(){// 次主程序 while(1){ Sleep(20); Sleep(20); getpos(); if(nukeflag){ setcolor(pc); spaceclif=(checkpos(45,75,135,95)&&key(mouse_l));9 行未改动 if(key(mouse_l)){ while(key(mouse_l)); keyboardchange(); } }else color(13,11); }else color(13,11); for(int i=0;i<=16;i++){ go((nukeflag?1:73),i); go((nukeflag?1:73),i); cout<<(i!=8?" ":(nukeflag?"→":"←")); //Sleep(10); } nukecheck; setcolor(dc); Sleep(10);//降低侦测速度,试试删除它会发生什么 getpos();//获取鼠标位置 getpress();//获得键盘按下情况 for(int i=1;i<=16;i++){ Sleep(10);//降低侦测速度,试试删除它会发生什么 getpos();//获取鼠标位置 getpress();//获得键盘按下情况 for(int i=1;i<=16;i++){ while(nukeflag); bool fl=cases[i]&&lp; bool fl=cases[i]&&lp; setcolor(dc); //sf意思是有没有在开启屏幕键盘 //sf意思是有没有在开启屏幕键盘 if(i<=13){ setcolor(fl||key(m[printid[i]])?pc:dc); }
else (key(mouses[i-14])?color(0,13):setcolor(dc)); printkey(keycol[i],keyrow[i],image[i]); if(fl&&i<=13){ pf=m.find(printid[i])->second;3 行未改动 go(41,1);cout<<((!sf)?"打开":"关闭"); cclear=(checkpos(485,270,535,290)&&key(mouse_l)); go(60,15);setcolor(cclear?pc:dc); cout<<"[清除]";
nukecheck;
while(clock()-q.front()>1511&&!q.empty()) q.pop(); setcolor(pc);go(59,12); cps=q.size()/1.511; if(cps<10){printf(" %03.1lf ",cps);}2 行未改动 else printf(" %.0lf ",cps); go(57,14);printf("Max-Cps:%.0lf ",maxc); go(54,4);cout<<acimage[on]; go(54,3);cout<<"----------------"; go(55,2);cout<<"ClickSpeed:"<<clickspeed<<" "; maxc=max(maxc,cps); go(55,2);cout<<"ClickSpeed:"<<clickspeed<<" "; maxc=max(maxc,cps); }}void click(int fast,int mode){// copyright 点击 void click(int fast,int mode){// copyright 点击 int random=rand(); int cd=(mode==0||mode==1)?(fast>>1):(fast?(random%(fast*3/4)+(random%(fast*3/4)<=fast/4?fast/4:0)):0);//非常不错的冷却计算器 int cd=(mode==0||mode==1)?(fast>>1):(fast?(random%(fast*3/4)+(random%(fast*3/4)<=fast/4?fast/4:0)):0);//非常不错的冷却计算器 DWORD down=((mode==0||mode==3)?MOUSEEVENTF_LEFTDOWN:MOUSEEVENTF_RIGHTDOWN); DWORD up=((mode==0||mode==3)?MOUSEEVENTF_LEFTUP:MOUSEEVENTF_RIGHTUP); mouse_event(down,0,0,0,0); int r=rand()%((cd/3)+1); int r=rand()%((cd/3)+1); Sleep(r%2==0?(cd-r):(cd+r)); mouse_event(up,0,0,0,0); q.push(clock()); Sleep(r%2?(cd-r):(cd+r));}bool f9=0,close;void runAC(){ //运行连点器 (run auto-clicker) void runAC(){ //运行连点器 (run auto-clicker) while(1){ Sleep(50); if(key(VK_F9)){ while(key(VK_F9));9 行未改动 if(on!=2) click(clickspeed==500?0:(int)cal,on); } }}void softkeyboard(){//软键盘 void softkeyboard(){//软键盘 while(1){ Sleep(50); if(pf!=-1){ if(sf){ keybd_event(pf,0,0,0); keybd_event(pf,0,KEYEVENTF_KEYUP,0); while(key(mouse_l)); pf=-1; }else pf=-1; //nuke a;a.BOOOOOOOOM(); //nuke a;a.BOOOOOOOOM(); } if(cclear!=0){ while(key(mouse_l)); Sleep(5);36 行未改动 back_keyboard(); nukeflag=0; } }} }int32_t main(){ cout<<setprecision(3); init(); setcolor(dc); back_keyboard(); thread t1(Main),t2(runAC),t3(scroll_check),t4(click_check),t5(softkeyboard); thread nUkE(Nuke); t1.join();t2.join();t3.join();t4.join();t5.join();3 行未改动