system.gui.desktop
Description
Allows for invoking system.gui functions on a specific desktop.
See the Multi-Monitor Clients page for more details.
Syntax
system.gui.desktop(handle )
-
Parameters
String handle - The handle for the desktop to use. 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
WindowUtilities - A copy of system.gui that will be relative to the desktop named by the given handle.
-
Scope
Client
Code Examples
Code Snippet
#The following example will make a message box appear on the Primary Desktop,
#regardless of where the script originates from.
system.gui.desktop().messageBox(
"This will appear on the Primary Desktop"
)
Code Snippet
#Retrieves a list of open windows in a specific Desktop. This example assumes a desktop with the handle "2nd Desktop" exists.
name
=
"2nd Desktop"
#Returns a tuple of open windows in the Desktop named "2nd Desktop"
windows
=
system.gui.desktop(name).getOpenedWindows()
#Converts the tuple to a string, and shows the items in a message box
system.gui.messageBox(
str
(windows))