标签:发送 scanf 消息 can end ast win std ret
使用前记得复制要发送的内容哦
1 #include<stdio.h> 2 #include<Windows.h> 3 4 int main(){ 5 int n; 6 char name[100]; 7 printf("请输入你要轰炸的对象:\n"); 8 scanf("%s",name); 9 printf("请输入你要轰炸的次数:\n"); 10 scanf("%d",&n); 11 HWND H = FindWindow(0,name);//找到对话窗口 12 while(n-- > 0){ 13 SendMessage(H,WM_PASTE,0,0);//粘贴内容 14 SendMessage(H,WM_KEYDOWN,VK_RETURN,0);//回车发送 15 } 16 return 0; 17 }
标签:发送 scanf 消息 can end ast win std ret
原文地址:https://www.cnblogs.com/Knight02/p/14280167.html