New
#1
Run command BEFORE going to sleep?
My setup requires me to manually turn my speakers on and off, I want to automate that.
I got a smart plug, installed python, and the python program that controls the plug
so I can now run a bat file with the line ofto turn the speakers off, and "...on" to turn on.Code:kasa --alias "speakerplug" off
When the computer starts or I login, and the computer wakes from sleep: I want the command to turn the speakers on to run
When the computer shuts down and sleeps: i want the command that turns the speakers off to run
I'm finding solutions for each condition, except when I want the command to run when sleep is initiated. I want the computer to be put to sleep by any normal means and turn off the speakers when doing so,
There seems to be a program that only works for Windows XP era systems and doesn't work, and there seems to be a Windows 7 era program, but all download links are broken.
How do I run a command that is automatically triggered when the computer starts to go to sleep, and completes running before the computer goes to sleep?