User Tools

Site Tools


macros:example:enableexternaldisplay

Example

System - Enable External Display (PC-Suite only)

by: Alex del Bondio/Gregory Haynes, June 2018
published: http://forum.avolites.com/viewtopic.php?f=20&t=5779
description: Enable the external display
remarks: works only for PC suite, not for consoles

functions

affected properties

Code

enableexternal.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <!-- enable the external display -->
  <macro id="Macros.enableExternalDisplay" name="Enable External Display">
    <sequence>
      <step>ActionScript.SetProperty("System.ExternalDisplay.Enabled", true)</step>
      <step>PanelManager.SetScreenState("externalDisplay", 0, System.ExternalDisplay.Enabled)</step>
     </sequence>
  </macro>
  <!-- disable the external display -->
  <macro id="Macros.disableExternalDisplay" name="Disable External Display">
    <sequence>
      <step>ActionScript.SetProperty("System.ExternalDisplay.Enabled", false)</step>
      <step>PanelManager.SetScreenState("externalDisplay", 0, System.ExternalDisplay.Enabled)</step>
     </sequence>
  </macro>
</avolites.macros>
The second line is also required on Titan Mobile and TitanOne to either open or close the additional application window; it should not be used on consoles as they don't work the same way and so may cause unexpected results.

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

  • ActionScript.SetProperty(“System.ExternalDisplay.Enabled”, true) sets the system property
  • PanelManager.SetScreenState(“externalDisplay”, 0, System.ExternalDisplay.Enabled) actually enables the display/window

How to use it

You could leave a comment if you were logged in.
macros/example/enableexternaldisplay.txt · Last modified: 2019/04/27 16:55 by sideshowbond

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki