Playlist as a Screensaver
  • 13 Jun 2024
  • 1 Minute to read

Playlist as a Screensaver


Article summary

A playlist can be used as a screensaver. To achieve this a background python script must run in a separate transparent layer. This script will trigger a scenario on/off depending on user interaction and the specified timeout.

  1. Create a Dise Movie via the CX Composer:
    1. Connect the python script as a background script:
import win32api

trigger = "ScreensaverTrigger"

while DISEScript.GetState(0) != "Terminated":
    x = win32api.GetLastInputInfo()
    z = x
    DISEScript.Sleep(60000)
    x = win32api.GetLastInputInfo()
    while x == z:
        DISEScript.SetTrigger(trigger, True)
        DISEScript.Log("debug", "Screensaver on")
        x = win32api.GetLastInputInfo()
        DISEScript.Sleep(1000)

    DISEScript.SetTrigger(trigger, False)
    DISEScript.Log("debug", "Screensaver off")

2. Create a layout with a transparent layer for the background script and a layer for the screensaver and standard/interactive content.

3. Create a trigger named 'ScreensaverTrigger'.

4. Create a trigger based scenario for the screensaver using 'ScreensaverTrigger'.

5. Schedule a playlist to the newly created scenario that will now act as a screensaver.

The screensaver timeout is set to 60 seconds by default. Change the 'DISEScript.Sleep(60000) to the required timeout in ms.




Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.