import pyautogui import os os.system(r'C:\Users\User\AppData\Roaming\Zoom\bin\Zoom.exe') position = pyautogui.locateOnScreen(r"join_button.png") pyautogui.click(position)
nimxete21#
这个答案可能有点晚了,但我很确定你必须在屏幕上定位后使用pyautogui.center(position)。所以,代码看起来像这样:
pyautogui.center(position)
import pyautogui import os os.system(r'C:\Users\User\AppData\Roaming\Zoom\bin\Zoom.exe') position = pyautogui.locateOnScreen(r"join_button.png") center_pos = pyautogui.center(position) pyautogui.click(center_pos)
1条答案
按热度按时间nimxete21#
这个答案可能有点晚了,但我很确定你必须在屏幕上定位后使用
pyautogui.center(position)
。所以,代码看起来像这样: