On Windows 7 & 10, the Spotify app doesn't prevent the display from turning off or the system going into Sleep mode (at least on the 3 windows machines I'm using). Is there a way to launch the app and incorporate the SetThreadExecutionState function into that thread to prevent the display sleeping while the app is running? Or any other function that will achieve that outcome?
I currently launch and close the app with two separate .bat files that change the sleep timers, but this is pretty clunky so I'd prefer a proper application to do it.