Prevents the system from entering sleep or turning off the display while the current application is running.
#Include <WinAPIEx.au3>
_WinAPI_SetThreadExecutionState ( $iFlags )
$iFlags | The thread's execution requirements. This parameter can be one or more of the following values. $ES_AWAYMODE_REQUIRED $ES_CONTINUOUS $ES_DISPLAY_REQUIRED $ES_SYSTEM_REQUIRED $ES_USER_PRESENT |
Success | The value is the previous thread execution state. |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
在MSDN中搜索