locateCenterOnScreen 截圖圖片與屏幕比對(duì)并定位,返回屏幕坐標(biāo)
importpyautogui
print(pyautogui.locateCenterOnScreen("C:\Users\Venkatesh_J\PycharmProjects\mouse_event\mouse_event.png"))
# Privacy_location = auto.locateCenterOnScreen('D://AppsUITest//Pages//111.jpg',grayscale=False) # 傳入按鈕的圖片
# print(Privacy_location)? # 返回屏幕所在位置
# im2 = auto.screenshot('my_screenshot.png')