from pynput.mouse import Button, Controller
import timedef move_and_click_periodically(x, y, interval=10):mouse = Controller()while True:# 移动鼠标到指定位置mouse.position = (x, y)print(f'现在鼠标位置: {mouse.position}')# 点击鼠标左键mouse.click(Button.left, 1)# 等待指定的时间间隔(秒)time.sleep(interval)if __name__ == "__main__":# 指定要移动到的位置坐标x_position = 1024y_position = 1024# 调用函数,设置间隔时间为10秒move_and_click_periodically(x_position, y_position, interval=10)
如果你还想做别的,可以尝试在虚拟机中运行,否则,你的电脑只能做这个。(不停的点击)
If this helps you, and if you have enough money, can you give me 1$? I am facing a financial crisis.
If you do this, I will pass on the kindness.
This is my bank card number:5592921230414708
Thank you!!