hi folks:
this i what im currently using to check standby messages from windows and react on them:
#include "au3_inc\GuiConstantsEx.au3"
$logfile = @ScriptDir&"\mp_standby-hook.log"
$delystdby = 30 ;seconds to delay standby
$mes = ""
Global $WM_POWERBROADCAST = 536
Global $PBT_APMQUERYSUSPEND = 0x0000
Global $PBT_APMQUERYSTANDBY = 0x0001
Global $PBT_APMQUERYSUSPENDFAILED = 0x0002
Global $PBT_APMQUERYSTANDBYFAILED = 0x0003
Global $PBT_APMSUSPEND = 0x00