Pyobjc does not support classes, and show warnings when I call them.
I use:
macOS Big Sur 11.7.4
Python 3.10 interpreter
PyCharm as code redactor.
I installed pyobjc via this command:
pip3 install -U pyobjc==9.0.1 pyobjc-core==9.0.1
I wrote a small script for determining the mouse location on the screen.
import AppKit, Quartz
location = AppKit.NSEvent.mouseLocation() # Cannot find reference 'NSEvent' in '__init__.py | __init__.py'
position = (round(location.x), round(Quartz.CGDisplayPixelsHigh(0) - round(location.y)))# Cannot find reference 'CGDisplayPixelsHigh' in '__init__.py | __init__.py | imported module Quartz'
However, I got mouse location, but warnings:
Cannot find reference 'NSEvent' in '__init__.py | __init__.py'
Cannot find reference 'CGDisplayPixelsHigh' in '__init__.py | __init__.py | imported module Quartz
How can I remove them?