帮忙解决一下
  • 板块灌水区
  • 楼主_1_2_3_4_5_
  • 当前回复3
  • 已保存回复3
  • 发布时间2024/4/5 19:46
  • 上次更新2024/4/5 21:16:15
查看原帖
帮忙解决一下
1208517
_1_2_3_4_5_楼主2024/4/5 19:46

昨天做的连点器还好好的
今天就不能运行了
请大神支个招

#include<iostream>
#include <windows.h>
#include <stdio.h>
using namespace std;
void js()
{
	if(GetAsyncKeyState('R') & 0x8000)
	{
		 INPUT input[2];
    ZeroMemory(input, sizeof(input));

    input[0].type = INPUT_MOUSE;
    input[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
    input[1].type = INPUT_MOUSE;
    input[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;

    SendInput(2, input, sizeof(INPUT));

	}
}
int main()
{
	cout<<"                            ------------------\n                            |   长方连点器   |  \n                            ------------------\n";
    cout<<"                            按'R'开始|按'Q'退出";
	while(2)
	{
	    js();
		Sleep(4);
		if(GetAsyncKeyState('Q') & 0x8000)
		return 0;
			
	}	
}

在这里提前感谢了

2024/4/5 19:46
加载中...