I'm trying to stop windows from powering off the monitor while playing a game or from watching movies and the only way I've found so far is using opencv with screenshots of the desktop.
Set the windows power options (Control Panel > Hardware and Sound > Power Options). You can control when the display turns off and the computer sleeps.