Home > Software engineering >  Pyautogui doesn't click windows privacy settings
Pyautogui doesn't click windows privacy settings

Time:12-02

I want to create a simple python script that enables and disables windows camera and mic settings when i have a zoom meeting. But pyautogui doesnt seem to move and click the On/Off switch in windows privacy settings.

It doesn't click the final button [in red]

Code

import pyautogui
import time

# Clicks windows open settings then open privacy settings all that.

pyautogui.moveTo(x=372, y=265)
pyautogui.click()

enter image description here

CodePudding user response:

Run your script with Administrative privileges.

If you are running your script via CMD/Powershell then run CMD/Powershell with administrative privileges.

  • Related