So I am learning to use python 3 and now the "pyautogui" module. When I try to use "pyautogui.click(x, y)". I get this error "[WinError 5] Access is denied". It still clicks the coordinates, but why I get this error. I have tried to run this from normal and administer CMD. I am using windows 10. If you can help me please help!
Thanks for advice!
The root cause is when you have a mouse options app installed (at least in my case).
I know it from this story: I had a python script that used click (twice). It worked well, but in the meantime, I installed a mouse settings app on my comp. After that I run my script, but got this access denied error. (However, the first click worked, only the second one gave that error). Then I uninstalled this mouse software (almost unusable anyway), and voila, the clicking was again all right.
Hope this helps you as well.
Pyautogui.click(x, y) error