1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<windows.h> 4 /* 5 按下windows+E键,打开资源管理器 6 */ 7 void main() { 8 keybd_event(0x5b ,0, 0, 0);//按下windows键 9 10 keybd_event(‘E‘, 0, 0, 0);//按下E键 11 keybd_event(‘E‘, 0, 2, 0);//松开E键 12 13 keybd_event(0x5b ,0, 2, 0);//键盘松开 14 15 Sleep(2000); 16 17 keybd_event(0x12,0,0,0);//按下alt 18 keybd_event(0x73, 0, 0, 0);//按下F4 19 20 keybd_event(0x12, 0, 2, 0);//松开alt 21 keybd_event(0x73, 0, 2, 0);//松开F4 22 23 24 }
时间: 2024-10-28 21:31:15