#include<bits/stdc++.h>
#include<windows.h>
void asd(char a){
keybd_event(a,0,0,0);
Sleep(1);
keybd_event(a,0,KEYEVENTF_KEYUP,0);
Sleep(1);
}
int main() {
srand(time(NULL));
POINT pt;
pt.x=100;
pt.y=100;
int len=1;
double x=1;
double y=1;
bool flag=0;
while(1){
while(!GetAsyncKeyState(38));
while(1){
if(rand()%10==0){
int t=rand()%8;
for(int i=1;i<=rand()%100;i++){
Sleep(10);
if(rand()%2==0){
x-=0.1*(rand()%5);
}else{
x+=0.1*(rand()%5);
}
if(x>1){
x=1;
}
if(x<-1){
x=-1;
}
if(rand()%2==0){
y+=0.1;
}else{
y-=0.1;
}
if(y>1){
y=1;
}
if(y<-1){
y=-1;
}
if(x>0&&pt.x>=1590){
x=-x;
}
if(x<0&&pt.x<=9){
x=-x;
}
if(y>0&&pt.y>=890){
y=-y;
}
if(y<0&&pt.y<=9){
y=-y;
}
pt.x+=len*x;
pt.y+=len*y;
if(rand()%2==0){
len++;
if(len>5){
len=4;
}
}else{
len--;
if(len<1){
len=1;
}
}
SetCursorPos(pt.x,pt.y);
}
}
SetCursorPos(pt.x,pt.y);
if(rand()%10==0){
flag=!flag;
if(flag==1){
mouse_event(MOUSEEVENTF_LEFTDOWN,pt.x,pt.y,0,NULL);
}else{
mouse_event(MOUSEEVENTF_LEFTUP,pt.x,pt.y,0,NULL);
}
}
int kkk=rand()%29;
if(kkk<=25){
asd('A'+kkk);
}else if(kkk==26){
asd(32);
}else if(kkk=27){
asd(13);
}else{
asd(8);
}
if(GetAsyncKeyState(VK_ESCAPE)){
break;
}
}
}
return 0;
}模仿人类
这是 2025年11月7日 存档的第 2 版,不是当前版本。查看当前版本