asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.5k stars 1.27k forks source link

Allow a "move the mouse" equivalent just to interrupt windows idle state even on lock screen. #892

Open tdbe opened 1 week ago

tdbe commented 1 week ago

Yes, I know and agree pyautogui should have a permanent FAILSAVE when on the lockscreen.

But I need a way to programatically make windows stop being idle; specifically to reset the windows idle time, only if certain conditions are true. The only way to do this afaiks is to "move the mouse" or "press a key" - which pyautogui does - except not on the lock screen :(

So I figure you could maybe allow a special builtin safe function that e.g. only & instantly moves the mouse 1px to the left then 1px to the right then back to where it was, even on the lockscreen.

😊✌️