python-鼠标宏
2021-01-08 14:33
标签:col port == als time mouse put lag imp 按下鼠标左键, 连击 按下鼠标右键, 停止 python-鼠标宏 标签:col port == als time mouse put lag imp 原文地址:https://www.cnblogs.com/strive-sun/p/12967022.htmlimport win32api
import time
from pynput.mouse import Button, Controller
mouse = Controller()
while True:
if (win32api.GetAsyncKeyState(0x01)&0x8000 > 0):
flag = True
while flag == True:
mouse.click(Button.left, 1)
time.sleep(0.1)
if (win32api.GetAsyncKeyState(0x02)&0x8000 > 0):
flag = False
else:
pass
下一篇:使用CSS 绘制各种形状