利用 pyautogui 读取 屏幕坐标
from tkinter import * # 导入窗口控件
import pyautogui
import math
width, height = pyautogui.size()
def kaishipaqu_begin():
currentMouseX, currentMouseY = pyautogui.position()
last_pos=pyautogui.position()
try:
while True:
new_pos=pyautogui.position()
if last_pos!=new_pos:
print(new_pos