Opening Another Desktop
Another Desktop may be opened by calling system.gui.openDesktop:
However, without specifying which windows to open, the Desktop will open without any opened windows. It is recommended to specify at least one window, a title, and a handle for the new desktop. Assuming a window exists at the path "Main Windows/Main Window", the following would open a new Desktop, open the specified window, and specify a title and handle for the window.
Navigating Windows in Desktops
Functions for the gui and nav scripting modules will execute in the Desktop that originated the call: If the Primary Desktop calls system.nav.swapTo, then the Primary Desktop will swap to a new window, but all other desktops will remain unaffected. However, it is possible for a script on one Desktop to force a navigation or GUI change on another Desktop with the following functions:
Additional scripting functions that interact with desktops exist in the gui and nav scripting modules. Please see the Scripting Appendix for more details.
Opening a Desktop on Each Monitor
Sometimes you may want your client to open a new desktop on each of your other monitors. It's pretty simple to get all of your monitors and open a client on each, but then you will have two on your main monitor. The following code block shows you how to skip the primary monitor and even how to open specific windows on each new desktop. This example assumes you have a 'Main Window/Overview' window, and that window has a custom string property in the root container named 'Display' to pass values into. Bind a label component to that custom property to easily check your script. This script is best placed in a Client Startup Script to open a client for each monitor on startup.