#include<stdio.h>
#include<stdlib.h>
#include<Windows.h>
void open()
{
ShellExecuteA(0, "open", "http://www.baidu.com/", 0, 0, 3); //打开网页
}
void close()
{
system("taskkill /f /im SogouExplorer.exe"); //关闭进程
}
void shubiao()
{
SetCursorPos(880,140); //移动鼠标
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); //按下鼠标
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); //松开鼠标
}
int main()
{
while (1)
{
open();
Sleep(3000); //等待
shubiao();
Sleep(2000);
close();
Sleep(3000);
}
return 0;
}
鼠标和网页开关的简单编程
最新推荐文章于 2022-06-08 09:33:11 发布