#include <WinAPI.au3>
#include <WinAPIsysinfoConstants.au3>
$Bool = DllStructCreate("byte")
_WinAPI_SystemParametersInfo($SPI_GETSCREENSAVERRUNNING, 0, DllStructGetPtr($Bool))
$Running = DllStructGetData($Bool, 1)
If $Running Then ConsoleWrite("Заставка запущена" & @CRLF)