This function is used in Python Scripting.


Allows you to close any of the open desktops associated with the current Client. See the Multi-Monitor Clients page for more details about using multiple monitors.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.



  • Parameters

String handle The handle for the desktop to close. The screen index cast as a string may be used instead of the handle. If omitted, this will default to the primary desktop. Alternatively, the handle "primary" can be used to refer to the primary desktop.

  • Returns


  • Scope

Vision Client

Code Examples
Code Snippet
# The following example closes desktop 2.
# The handle must be a string.
Code Snippet
# The following example closes the desktop named "Left Monitor".
system.gui.closeDesktop("Left Monitor")

system gui closeDesktop, gui.closeDesktop