I know that we can lock screen of Win10 with python code below:
user32.LockWorkStation()
But how can I know that whether the screen is locked at certain time? Thanks!
According to my understanding there is no ONE api function to do it with. But I advice You to take a look on this relevant link: In Python 3, how can I tell if Windows is locked?
Good luck!