Dise Methods Library
  • 12 Jun 2024
  • 1 Minute to read

Dise Methods Library


Article summary

The Dise library provides access to methods to interface with Dise via a script. Dise methods can be called from HTML, Python, JScript and VBScript.

Use a different prefix depending on what type of script is being used:

HTML (Markup) - Use the prefix 'Dise.'

Python, JScript, VBScript - Use the prefix 'DISEScript.'

Log

Log a message to the system log and CX Portal. 

Dise.log("log level", "message")
DISEScript.log("log level", "message")

Log level can be one of the following:

  • debug (default)
  • info
  • notice
  • warning
  • error
  • critical
  • alert
  • emergency

Sleep

Pause the script for a specified time (in milliseconds).

Dise.sleep(int)
DISEScript.sleep(int)

Get Variable

Return the value of a specified variable.

Dise.getVariable("scope", "name")
DISEScript.getVariable("scope", "name")

Scope can be one of the following:

  • global - Access global variables, used mainly in background scripts.
  • local - Access local variables from a template. Can only be used in load scripts.

Set Variable

Set the value of a specified variable.

Dise.setVariable("scope", "name", "value")
DISEScript.setVariable("scope", "name", "value")

Scope can be one of the following:

  • global - Set a global variable for the player running the script.
  • local - Set a local variable for a template on the player running the script.

Get Trigger

Return the boolean value of the current state of a specified trigger.

Dise.getTrigger("name")
DISEScript.getTrigger("name")

Set Trigger

Set the boolean value of a specified trigger.

Dise.setTrigger("name", true/false)
DISEScript.setTrigger("name", true/false)

Toggle Trigger

Set the opposite boolean value of the current state of a specified trigger.

Dise.toggleTrigger("name")
DISEScript.toggleTrigger("name")

Back

Send a command to a specified layer for the playback to go back one scene. A layer name can be excluded if only one layer is running.

Dise.back("name")
DISEScript.back("name")

Forward

Send a command to a specified layer for the playback to go forward one scene. A layer name can be excluded if only one layer is running.

Dise.forward("name")
DISEScript.forward("name")

Action

Send a special action to the player.

Dise.action("name", "param1", "param2")
DISEScript.action("name", "param1", "param2")

The action name can be one of the following:

  • UpdateFile - Triggers a file update:
    • Param1 is the destination file.
    • Param2 is the source file.
  • TakeOver - Creates a new layer for a specified media file which is played, exclusively on top, once. All other content is paused during the takeover:
    • Param1 is the media file path.
    • Param2 is the media file type.

Reload

Triggers a reload of a webpage, if a webpage is currently playing.

Dise.reload()
DISEScript.reload()

Exit

Immediately exits the currently running script.

Dise.exit()
DISEScript.exit()

Was this article helpful?

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.