1
已解决
王泽宇
新手守护
新手守护
#include<windows.h>
#include<stdio.h>
void ctrl_v(int x = 86)//模拟ctrl+v
{
keybd_event(VK_CONTROL,0,0,0);//按下ctrl
keybd_event(x,0,0,0);//按下v
keybd_event(x,0,KEYEVENTF_KEYUP,0);//弹起v
keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0);//弹起ctrl
}
int main()
{
int a;
scanf("%d",&a);//输入次数
Sleep(5000);//等待5秒(为了不一瞬间全部模拟)
for(int i = 0;i < a;i++)
{
ctrl_v();//ctrl+v
keybd_event(13,0,0,0);//按下Enter
Sleep(100);//等待0.1秒,你不想电脑卡炸吧
}
}
炸屏代码,酌情使用~