import os
import time
import pyautogui
value = True;
try:
while value:
x, y = pyautogui.position()
pos = "鼠标当前位置: {} , {}".format(str(x), str(y))
print(pos)
time.sleep(0.2)
os.system('cls')
except KeyboardInterrupt:
print("end...")
Python 基于pyautogui实时获取鼠标坐标
于 2023-06-13 23:02:56 首次发布