--- title: "system.vision.getCurrentDesktop" description: "Returns the handle of the desktop this function was called from." --- # system.vision.getCurrentDesktop > Returns the handle of the desktop this function was called from. :::info Backwards Compatibility This function replaces [system.gui.getCurrentDesktop](versioned_docs/version-8.1/appendix/scripting-functions/system-gui/system-gui-getCurrentDesktop.md). Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. ::: This function is used in **Python Scripting**. ## Description Returns the handle of the desktop this function was called from. Commonly used with the [system.vision.desktop](appendix\scripting-functions\system-vision\system-vision-desktop.md) function. :::note If you have already created a reference to your desktop in a script, you can use the VisionUtilities wrapper class instance method getHandle() instead. Note that you may have to repeat the desktop handle when using this method. ::: ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.vision.getCurrentDesktop()` ### Parameters Nothing ### Returns **String** - The handle of the current desktop. ### Scope Vision Client ## Code Example ```python title="Getting a Desktop's Handle" # Shows the desktop's handle in a message box. system.vision.showMessage("This desktop's handle is: %s" % system.vision.getCurrentDesktop()) ```