PyAutoGUI to answer call

12 views Asked by At

I am trying to create a bot which uses PyAutoGUI to answer calls on MS Teams. I want to use the locateOnScreen function which uses an image of the answer icon to answer the call each time one pops up.

Is this possible?

I tried the following code but it didn't work:

import pyautogui, time

time.sleep(5)
location = pyautogui.locateOnScreen('C:\Users\MyAcc\PycharmProjects\videocall\callicon.png')
pyautogui.click(location)

0

There are 0 answers