I have a programm that use pyautogui. There are some mouse moves, clicks etc. Computer goes to sleep mode and mouse moves doesn't work there. I want to programm auto waking up from sleep mode at time for my pyautogui script available. I find some answers with SetWaitableTimer() but can not to code it right. Sorry for my bad English.
Asked
Active
Viewed 806 times
0
-
instead of using your script to wake things up, why not use Windows Task Scheduler to wake up the pc and run your script – nigh_anxiety Jul 03 '22 at 03:51
1 Answers
1
According to THIS
You should use keyboard event which will make your computer active and doesn't let to go in sleep mode.
The code describes there was:
import pyautogui
import time
while True:
pyautogui.press('volumedown')
time.sleep(1)
pyautogui.press('volumeup')
time.sleep(5)
Hope it helps!

Ayush Raj
- 294
- 3
- 14