自动点击CSDN博客主页第一条10次

C++:

#include 
#include
using namespace std;
int main() {
	Sleep(5000);
    for(int i=1;i<=10;i++){
    	Sleep(1000);
    	SetCursorPos(754,506);
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
    Sleep(1000);
    SetCursorPos(470,15);
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
    Sleep(5000);
	}
    return 0;
}

你可能感兴趣的:(C++,c++,自动化)