Er, yeah the documentation is right. Calling SetThreadExecutionState(ES_DISPLAY_REQUIRED) just resets the idle idle timer, so it would need to be called regularly.
Python testcase:
import ctypes, time
while True:
ctypes.windll.kernel32.SetThreadExecutionState(0x00000002)
time.sleep(10)
Er, yeah the documentation is right. Calling SetThreadExecut ionState( ES_DISPLAY_ REQUIRED) just resets the idle idle timer, so it would need to be called regularly.
Python testcase: windll. kernel32. SetThreadExecut ionState( 0x00000002)
import ctypes, time
while True:
ctypes.
time.sleep(10)