Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to make computer go in sleep mode using pythn

import mouse
import time
import os
import pyttsx3
while True:
    before_sleep = mouse.get_position()
    time.sleep(600)
    after_sleep = mouse.get_position()
    if before_sleep == after_sleep:
        pyttsx3.speak("Going to shut down")
        os.system("shutdown /s /t 1")
 
PREVIOUS NEXT
Tagged: #computer #sleep #mode #pythn
ADD COMMENT
Topic
Name
5+9 =