I was searching for solution to "Prevent ScreenSaver".
I know this was disscused before, for example in the following topic's:
But today I was reading this:
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-systemparametersinfoa
....
....
....
And I'm wondering if somebody could provide example how to use this parameter together with this:
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-sendinput
I've been using this for years. works great! I'm sure I got it from this site, but I can't remember who posted it.
$aRet = DllCall('kernel32.dll', 'long', 'SetThreadExecutionState', 'long', 0x80000003) ;Disable windows sleep mode by making it think it's playing a movie in full screen
$aRet=DllCall('kernel32.dll','long','SetThreadExecutionState','long',0x80000000) ;Remove the always on so it will go to sleep