System Events Module Reference

New in version 0.1.0.

Control the macOS System Events application using JXA-like syntax.

Classes:

XASystemEventsAction(properties)

An action that can be performed on the UI element.

XASystemEventsActionList(properties[, filter])

A wrapper around lists of actions that employs fast enumeration techniques.

XASystemEventsAppearancePreferencesObject(...)

A collection of appearance preferences.

XASystemEventsApplication(properties)

A class for managing and interacting with System Events.app.

XASystemEventsApplicationProcess(properties)

A process launched from an application file.

XASystemEventsApplicationProcessList(properties)

A wrapper around lists of application processes that employs fast enumeration techniques.

XASystemEventsAttribute(properties)

A named data value associated with the UI element.

XASystemEventsAttributeList(properties[, filter])

A wrapper around lists of attributes that employs fast enumeration techniques.

XASystemEventsCDAndDVDPreferencesObject(...)

The user's CD and DVD insertion preferences.

XASystemEventsConfiguration(properties)

A collection of settings for configuring a connection.

XASystemEventsConfigurationList(properties)

A wrapper around lists of configurations that employs fast enumeration techniques.

XASystemEventsDeskAccessoryProcess(properties)

A process launched from an desk accessory file.

XASystemEventsDeskAccessoryProcessList(...)

A wrapper around lists of desk accessory processes that employs fast enumeration techniques.

XASystemEventsDesktop(properties)

Desktop picture settings for desktops belonging to the user.

XASystemEventsDesktopList(properties[, filter])

A wrapper around lists of desktops that employs fast enumeration techniques.

XASystemEventsDockPreferencesObject(properties)

The current user's dock preferences.

XASystemEventsDocument(properties)

A document of System Events.app.

XASystemEventsDocumentList(properties[, filter])

A wrapper around lists of documents that employs fast enumeration techniques.

XASystemEventsFolderAction(properties)

An action attached to a folder in the file system.

XASystemEventsFolderActionList(properties[, ...])

A wrapper around lists of folder actions that employs fast enumeration techniques.

XASystemEventsInsertionPreference(properties)

A specific insertion preference.

XASystemEventsInterface(properties)

A collection of settings for a network interface.

XASystemEventsInterfaceList(properties[, filter])

A wrapper around lists of network interfaces that employs fast enumeration techniques.

XASystemEventsLocation(properties)

A set of services.

XASystemEventsLocationList(properties[, filter])

A wrapper around lists of service locations that employs fast enumeration techniques.

XASystemEventsLoginItem(properties)

An item to be launched or opened at login.add()

XASystemEventsLoginItemList(properties[, filter])

A wrapper around lists of login items that employs fast enumeration techniques.

XASystemEventsNetworkPreferencesObject(...)

The preferences for the current user's network.

XASystemEventsPrintSettings(properties)

Settings for printing.

XASystemEventsProcess(properties)

A process running on this computer.

XASystemEventsProcessList(properties[, ...])

A wrapper around lists of processes that employs fast enumeration techniques.

XASystemEventsPropertyListFile(properties)

A file containing data in Property List format.

XASystemEventsPropertyListFileList(properties)

A wrapper around lists of property list files that employs fast enumeration techniques.

XASystemEventsPropertyListItem(properties)

A unit of data in Property List format.

XASystemEventsPropertyListItemList(properties)

A wrapper around lists of property list items that employs fast enumeration techniques.

XASystemEventsScreenSaver(properties)

An installed screen saver.

XASystemEventsScreenSaverList(properties[, ...])

A wrapper around lists of screen savers that employs fast enumeration techniques.

XASystemEventsScreenSaverPreferencesObject(...)

Screen saver settings.

XASystemEventsScript(properties)

A script invoked by a folder action.

XASystemEventsScriptList(properties[, filter])

A wrapper around lists of scripts that employs fast enumeration techniques.

XASystemEventsScriptingClass(properties)

A class within a suite within a scripting definition.

XASystemEventsScriptingClassList(properties)

A wrapper around lists of scripting classes that employs fast enumeration techniques.

XASystemEventsScriptingCommand(properties)

A command within a suite within a scripting definition.

XASystemEventsScriptingCommandList(properties)

A wrapper around lists of scripting commands that employs fast enumeration techniques.

XASystemEventsScriptingDefinitionObject(...)

The scripting definition of the System Events application.

XASystemEventsScriptingElement(properties)

An element within a class within a suite within a scripting definition.

XASystemEventsScriptingElementList(properties)

A wrapper around lists of scripting elements that employs fast enumeration techniques.

XASystemEventsScriptingEnumeration(properties)

An enumeration within a suite within a scripting definition.

XASystemEventsScriptingEnumerationList(...)

A wrapper around lists of scripting enumerations that employs fast enumeration techniques.

XASystemEventsScriptingEnumerator(properties)

An enumerator within an enumeration within a suite within a scripting definition.

XASystemEventsScriptingEnumeratorList(properties)

A wrapper around lists of scripting enumerators that employs fast enumeration techniques.

XASystemEventsScriptingParameter(properties)

A parameter within a command within a suite within a scripting definition.

XASystemEventsScriptingParameterList(properties)

A wrapper around lists of scripting parameters that employs fast enumeration techniques.

XASystemEventsScriptingProperty(properties)

A property within a class within a suite within a scripting definition.

XASystemEventsScriptingPropertyList(properties)

A wrapper around lists of scripting properties that employs fast enumeration techniques.

XASystemEventsScriptingResultObject(properties)

The result of a command within a suite within a scripting definition.

XASystemEventsScriptingResultObjectList(...)

A wrapper around lists of scripting result objects that employs fast enumeration techniques.

XASystemEventsScriptingSuite(properties)

A suite within a scripting definition.

XASystemEventsScriptingSuiteList(properties)

A wrapper around lists of scripting suites that employs fast enumeration techniques.

XASystemEventsSecurityPreferencesObject(...)

A collection of security preferences.

XASystemEventsService(properties)

A collection of settings for a network service.

XASystemEventsServiceList(properties[, filter])

A wrapper around lists of services that employs fast enumeration techniques.

XASystemEventsUIElement(properties)

A piece of the user interface of a process.

XASystemEventsUIElementList(properties[, ...])

A wrapper around lists of UI elements that employs fast enumeration techniques.

XASystemEventsUser(properties)

A user of the system.

XASystemEventsUserList(properties[, filter])

A wrapper around lists of users that employs fast enumeration techniques.

XASystemEventsWindow(properties)

A window belonging to a process.

XASystemEventsWindowList(properties[, ...])

A wrapper around a list of windows.

XASystemEventsXMLAttribute(properties)

A named value associated with a unit of data in XML format.

XASystemEventsXMLAttributeList(properties[, ...])

A wrapper around lists of XML attributes that employs fast enumeration techniques.

XASystemEventsXMLData(properties)

Data in XML format.

XASystemEventsXMLDataList(properties[, filter])

A wrapper around lists of XML data that employs fast enumeration techniques.

XASystemEventsXMLElement(properties)

A unit of data in XML format.

XASystemEventsXMLElementList(properties[, ...])

A wrapper around lists of XML elements that employs fast enumeration techniques.

XASystemEventsXMLFile(properties)

A file containing data in XML format.

XASystemEventsXMLFileList(properties[, filter])

A wrapper around lists of XML files that employs fast enumeration techniques.

class PyXA.apps.SystemEvents.XASystemEventsAction(properties)[source]

Bases: XAObject

An action that can be performed on the UI element.

New in version 0.1.0.

Attributes:

name

The name of the action.

object_description

What the action does.

Methods:

perform()

Performs the action.

property name: str

The name of the action.

property object_description: str

What the action does.

perform()[source]

Performs the action.

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsActionList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of actions that employs fast enumeration techniques.

All properties of actions can be called as methods on the wrapped list, returning a list containing each action’s value for the property.

New in version 0.1.0.

Methods:

by_name(name)

by_object_description(object_description)

name()

object_description()

by_name(name: str) XASystemEventsAction | None[source]
by_object_description(object_description: str) XASystemEventsAction | None[source]
name() list[str][source]
object_description() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsAppearancePreferencesObject(properties)[source]

Bases: XAObject

A collection of appearance preferences.

New in version 0.1.0.

Attributes:

appearance

The overall look of buttons, menus and windows.

dark_mode

Whether to use dark menu bar and dock.

font_smoothing

Is font smoothing on?

font_smoothing_style

The method used for smoothing fonts.

highlight_color

The color used for hightlighting selected text and lists.

recent_applications_limit

The number of recent applications to track.

recent_documents_limit

The number of recent documents to track.

recent_servers_limit

The number of recent servers to track.

scroll_bar_action

The action performed by clicking the scroll bar.

smooth_scrolling

Is smooth scrolling used?

property appearance: Appearance

The overall look of buttons, menus and windows.

property dark_mode: bool

Whether to use dark menu bar and dock.

property font_smoothing: bool

Is font smoothing on?

property font_smoothing_style: FontSmoothingStyle

The method used for smoothing fonts.

property highlight_color: HighlightColor

The color used for hightlighting selected text and lists.

property recent_applications_limit: int

The number of recent applications to track.

property recent_documents_limit: int

The number of recent documents to track.

property recent_servers_limit: int

The number of recent servers to track.

property scroll_bar_action: ScrollPageBehavior

The action performed by clicking the scroll bar.

property smooth_scrolling: bool

Is smooth scrolling used?

class PyXA.apps.SystemEvents.XASystemEventsApplication(properties)[source]

Bases: XAEventsApplication, XASBApplication, XACanPrintPath

A class for managing and interacting with System Events.app.

New in version 0.1.0.

Classes:

AccessRight(value)

Access right levels.

Appearance(value)

Appearance colors.

DoubleClickBehavior(value)

Options for double click behaviors.

DynamicStyle(value)

Options for the dynamic style of the desktop background.

FontSmoothingStyle(value)

Font smoothing styles.

HighlightColor(value)

Highlight colors.

Key(value)

Keys and key actions.

MediaInsertionAction(value)

Actions to perform when media is inserted.

MinimizeEffect(value)

Options for the effect to use when minimizing applications.

ObjectType(value)

Types of objects that can be created.

PictureRotation(value)

Desktop image picture rotation settings.

ScreenLocation(value)

Locations on the screen.

ScrollPageBehavior(value)

Scroll page behaviors.

Methods:

abort_transaction()

Aborts the current transaction.

aliases([filter])

Returns a list of aliases, as PyXA-wrapped objects, matching the given filter.

application_processes([filter])

Returns a list of application processes, as PyXA-wrapped objects, matching the given filter.

begin_transaction()

Discards the results of a bounded update session with one or more files.

click()

Clicks on the application.

desk_accessory_processes([filter])

Returns a list of desk accessory processes, as PyXA-wrapped objects, matching the given filter.

desktops([filter])

Returns a list of desktops, as PyXA-wrapped objects, matching the given filter.

disk_items([filter])

Returns a list of disk items, as PyXA-wrapped objects, matching the given filter.

disks([filter])

Returns a list of disks, as PyXA-wrapped objects, matching the given filter.

documents([filter])

Returns a list of documents, as PyXA-wrapped objects, matching the given filter.

domains([filter])

Returns a list of domains, as PyXA-wrapped objects, matching the given filter.

end_transaction()

Ends the current transaction gracefully.

file_packages([filter])

Returns a list of file packages, as PyXA-wrapped objects, matching the given filter.

files([filter])

Returns a list of files, as PyXA-wrapped objects, matching the given filter.

folder_actions([filter])

Returns a list of folder actions, as PyXA-wrapped objects, matching the given filter.

folders([filter])

Returns a list of folders, as PyXA-wrapped objects, matching the given filter.

key_code(key_code[, modifier])

Cause the target (active) process to behave as if key codes were entered.

key_stroke(keystroke[, modifier])

Cause the target (active) process to behave as if keystrokes were entered.

log_out()

Logs out the current user.

login_items([filter])

Returns a list of login items, as PyXA-wrapped objects, matching the given filter.

make(specifier, properties[, data])

Creates a new element of the given specifier class without adding it to any list.

processes([filter])

Returns a list of processes, as PyXA-wrapped objects, matching the given filter.

property_list_files([filter])

Returns a list of property list files, as PyXA-wrapped objects, matching the given filter.

property_list_items([filter])

Returns a list of property list items, as PyXA-wrapped objects, matching the given filter.

restart([state_saving_preference])

Restarts the computer.

screen_savers([filter])

Returns a list of screen savers, as PyXA-wrapped objects, matching the given filter.

shut_down([state_saving_preference])

Shuts down the computer.

sleep()

Puts the computer to sleep.

ui_elements([filter])

Returns a list of UI elements, as PyXA-wrapped objects, matching the given filter.

users([filter])

Returns a list of users, as PyXA-wrapped objects, matching the given filter.

xml_datas([filter])

Returns a list of XML datas, as PyXA-wrapped objects, matching the given filter.

xml_files([filter])

Returns a list of XML files, as PyXA-wrapped objects, matching the given filter.

Attributes:

appearance_preferences

A collection of appearance preferences.

application_support_folder

The Application Support folder.

applications_folder

The user's Applications folder.

cd_and_dvd_preferences

The preferences for the current user when a CD or DVD is inserted.

classic_domain

The collection of folders belonging to the Classic System.

current_desktop

The primary desktop.

current_screen_saver

The currently selected screen saver.

current_user

The currently logged in user.

desktop_folder

The user's Desktop folder.

desktop_pictures_folder

The Desktop Pictures folder.

dock_preferences

The preferences for the current user's dock.

documents_folder

The user's Documents folder.

downloads_folder

The user's Downloads folder.

favorites_folder

The user's Favorites folder.

folder_action_scripts_folder

The user's Folder Action Scripts folder.

folder_actions_enabled

Are Folder Actions currently being processed?

fonts_folder

The Fonts folder.

frontmost

Is this the active application?

home_folder

The Home folder of the currently logged in user.

library_folder

The Library folder.

local_domain

The collection of folders residing on the Local machine.

movies_folder

The user's Movies folder.

music_folder

The user's Music folder.

name

The name of the application.

network_domain

The collection of folders residing on the Network.

network_preferences

The preferences for the current user's network.

pictures_folder

The user's Pictures folder.

preferences_folder

The user's Preferences folder.

public_folder

The user's Public folder.

quit_delay

The time in seconds the application will idle before quitting; if set to zero, idle time will not cause the application to quit.

screen_saver_preferences

The preferences common to all screen savers.

script_menu_enabled

Is the Script menu installed in the menu bar?

scripting_additions_folder

The Scripting Additions folder.

scripting_definition

The scripting definition of the System Events application.

scripts_folder

The user's Scripts folder.

security_preferences

A collection of security preferences.

shared_documents_folder

The Shared Documents folder.

sites_folder

The user's Sites folder.

speakable_items_folder

The Speakable Items folder.

startup_disk

The disk from which Mac OS X was loaded.

system_domain

The collection of folders belonging to the System.

temporary_items_folder

The Temporary Items folder.

trash

The user's Trash folder.

ui_elements_enabled

Are UI element events currently being processed?

user_domain

The collection of folders belonging to the User.

utilities_folder

The Utilities folder.

version

The version number of the application.

workflows_folder

The Automator Workflows folder.

class AccessRight(value)[source]

Bases: Enum

Access right levels.

Attributes:

NONE

READ

Read only

READ_WRITE

Read and write

WRITE

Write only

NONE = 1852796517
READ = 1919246692

Read only

READ_WRITE = 1919186802

Read and write

WRITE = 2003986804

Write only

class Appearance(value)[source]

Bases: Enum

Appearance colors.

Attributes:

BLUE

GRAPHITE

BLUE = 1651275109
GRAPHITE = 1735550580
class DoubleClickBehavior(value)[source]

Bases: Enum

Options for double click behaviors.

Attributes:

MINIMIZE

Minimize

OFF

Off

ZOOM

Zoom

MINIMIZE = 1684303209

Minimize

OFF = 1684303718

Off

ZOOM = 1684306543

Zoom

class DynamicStyle(value)[source]

Bases: Enum

Options for the dynamic style of the desktop background.

Attributes:

AUTO

automatic (if supported, follows light/dark appearance)

DARK

dark style

DYNAMIC

dynamic (if supported, updates desktop picture based on time and/or location)

LIGHT

light style

UNKNOWN

unknown style

AUTO = 1635020148

automatic (if supported, follows light/dark appearance)

DARK = 1684107883

dark style

DYNAMIC = 1685679725

dynamic (if supported, updates desktop picture based on time and/or location)

LIGHT = 1818850405

light style

UNKNOWN = 504363703359

unknown style

class FontSmoothingStyle(value)[source]

Bases: Enum

Font smoothing styles.

Attributes:

AUTOMATIC

LIGHT

MEDIUM

STANDARD

STRONG

AUTOMATIC = 1635087469
LIGHT = 1818850405
MEDIUM = 1835361385
STANDARD = 1937010276
STRONG = 1937011303
class HighlightColor(value)[source]

Bases: Enum

Highlight colors.

Attributes:

BLUE

GOLD

GRAPHITE

GREEN

ORANGE

PURPLE

RED

SILVER

BLUE = 1651275109
GOLD = 1735355492
GRAPHITE = 1735550580
GREEN = 1735550318
ORANGE = 1869770343
PURPLE = 1886548076
RED = 1919247392
SILVER = 1936488050
class Key(value)[source]

Bases: Enum

Keys and key actions.

Attributes:

CAPS_LOCK

COMMAND

CONTROL

FUNCTION

OPTION

SHIFT

CAPS_LOCK = 4
COMMAND = 0
CONTROL = 1
FUNCTION = 5
OPTION = 2
SHIFT = 3
class MediaInsertionAction(value)[source]

Bases: Enum

Actions to perform when media is inserted.

Attributes:

ASK_WHAT_TO_DO

IGNORE

OPEN_APPLICATION

RUN_A_SCRIPT

ASK_WHAT_TO_DO = 1684562291
IGNORE = 1684564327
OPEN_APPLICATION = 1684562288
RUN_A_SCRIPT = 1684566643
class MinimizeEffect(value)[source]

Bases: Enum

Options for the effect to use when minimizing applications.

Attributes:

GENIE

Genie effect

SCALE

Scale effect

GENIE = 1734700649

Genie effect

SCALE = 1935892844

Scale effect

class ObjectType(value)[source]

Bases: Enum

Types of objects that can be created.

Attributes:

FILE

FOLDER

LOGIN_ITEM

FILE = 'file'
FOLDER = 'folder'
LOGIN_ITEM = 'login_item'
class PictureRotation(value)[source]

Bases: Enum

Desktop image picture rotation settings.

Attributes:

AFTER_SLEEP

NEVER

USING_INTERVAL

USING_LOGIN

AFTER_SLEEP = 3
NEVER = 0
USING_INTERVAL = 1
USING_LOGIN = 2
class ScreenLocation(value)[source]

Bases: Enum

Locations on the screen.

Attributes:

BOTTOM

Bottom of screen

LEFT

Left side of screen

RIGHT

Right side of screen

BOTTOM = 1651471476

Bottom of screen

LEFT = 1818584692

Left side of screen

RIGHT = 1919510376

Right side of screen

class ScrollPageBehavior(value)[source]

Bases: Enum

Scroll page behaviors.

Attributes:

JUMP_TO_HERE

Jump to here

JUMP_TO_NEXT_PAGE

Jump to next page

JUMP_TO_HERE = 1953458290

Jump to here

JUMP_TO_NEXT_PAGE = 1853386855

Jump to next page

abort_transaction()[source]

Aborts the current transaction.

New in version 0.1.0.

aliases(filter: dict | None = None) XAAliasList | None[source]

Returns a list of aliases, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned aliases will have, or None

Returns:

The list of aliases

Return type:

XABase.XAAliasList

New in version 0.1.0.

property appearance_preferences: XASystemEventsAppearancePreferencesObject

A collection of appearance preferences.

application_processes(filter: dict | None = None) XASystemEventsApplicationProcessList | None[source]

Returns a list of application processes, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned processes will have, or None

Returns:

The list of processes

Return type:

XASystemEventsApplicationProcessList

New in version 0.1.0.

property application_support_folder: XAFolder

The Application Support folder.

property applications_folder: XAFolder

The user’s Applications folder.

begin_transaction() int[source]

Discards the results of a bounded update session with one or more files.

Returns:

_description_

Return type:

int

property cd_and_dvd_preferences: XASystemEventsCDAndDVDPreferencesObject

The preferences for the current user when a CD or DVD is inserted.

property classic_domain: XAClassicDomainObject

The collection of folders belonging to the Classic System.

click()[source]

Clicks on the application.

New in version 0.1.0.

property current_desktop: XASystemEventsDesktop

The primary desktop.

property current_screen_saver: XASystemEventsScreenSaver

The currently selected screen saver.

property current_user: XASystemEventsUser

The currently logged in user.

desk_accessory_processes(filter: dict | None = None) XASystemEventsDeskAccessoryProcessList | None[source]

Returns a list of desk accessory processes, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned processes will have, or None

Returns:

The list of processes

Return type:

XASystemEventsDeskAccessoryProcessList

New in version 0.1.0.

property desktop_folder: XAFolder

The user’s Desktop folder.

property desktop_pictures_folder: XAFolder

The Desktop Pictures folder.

desktops(filter: dict | None = None) XASystemEventsDesktopList | None[source]

Returns a list of desktops, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned desktops will have, or None

Returns:

The list of desktops

Return type:

XASystemEventsDesktopList

New in version 0.1.0.

disk_items(filter: dict | None = None) XADiskItemList | None[source]

Returns a list of disk items, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned disk items will have, or None

Returns:

The list of disk items

Return type:

XABase.XADiskItemList

New in version 0.1.0.

disks(filter: dict | None = None) XADiskList | None[source]

Returns a list of disks, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned disks will have, or None

Returns:

The list of disks

Return type:

XABase.XADiskList

New in version 0.1.0.

property dock_preferences: XASystemEventsDockPreferencesObject

The preferences for the current user’s dock.

documents(filter: dict | None = None) XASystemEventsDocumentList | None[source]

Returns a list of documents, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned documents will have, or None

Returns:

The list of documents

Return type:

XASystemEventsDocumentList

New in version 0.1.0.

property documents_folder: XAFolder

The user’s Documents folder.

domains(filter: dict | None = None) XADomainList | None[source]

Returns a list of domains, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned domains will have, or None

Returns:

The list of domains

Return type:

XABase.XADomainList

New in version 0.1.0.

property downloads_folder: XAFolder

The user’s Downloads folder.

end_transaction()[source]

Ends the current transaction gracefully.

New in version 0.1.0.

property favorites_folder: XAFolder

The user’s Favorites folder.

file_packages(filter: dict | None = None) XAFilePackageList | None[source]

Returns a list of file packages, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned file packages will have, or None

Returns:

The list of file packages

Return type:

XABase.XAFilePackageList

New in version 0.1.0.

files(filter: dict | None = None) XAFileList | None[source]

Returns a list of files, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned files will have, or None

Returns:

The list of files

Return type:

XABase.XAFileList

New in version 0.1.0.

property folder_action_scripts_folder: XAFolder

The user’s Folder Action Scripts folder.

folder_actions(filter: dict = None) XABase.XAFolderActionList | None[source]

Returns a list of folder actions, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned folder actions will have, or None

Returns:

The list of folder actions

Return type:

XABase.XAFolderActionList

New in version 0.1.0.

property folder_actions_enabled: bool

Are Folder Actions currently being processed?

folders(filter: dict | None = None) XAFolderList | None[source]

Returns a list of folders, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned folders will have, or None

Returns:

The list of folders

Return type:

XABase.XAFolderList

New in version 0.1.0.

property fonts_folder: XAFolder

The Fonts folder.

property frontmost: bool

Is this the active application?

property home_folder: XAFolder

The Home folder of the currently logged in user.

key_code(key_code: int | list[int], modifier: Key | list[XASystemEventsApplication.Key] | None = None)[source]

Cause the target (active) process to behave as if key codes were entered.

Parameters:

New in version 0.1.0.

key_stroke(keystroke: int | list[int], modifier: Key | list[XASystemEventsApplication.Key] | None = None)[source]

Cause the target (active) process to behave as if keystrokes were entered.

Parameters:

New in version 0.1.0.

property library_folder: XAFolder

The Library folder.

property local_domain: XALocalDomainObject

The collection of folders residing on the Local machine.

log_out()[source]

Logs out the current user.

New in version 0.1.0.

login_items(filter: dict | None = None) XASystemEventsLoginItemList | None[source]

Returns a list of login items, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned login items will have, or None

Returns:

The list of login items

Return type:

XASystemEventsLoginItemList

New in version 0.1.0.

make(specifier: str | ObjectType, properties: dict, data: Any | None = None)[source]

Creates a new element of the given specifier class without adding it to any list.

Use XABase.XAList.push() to push the element onto a list.

Parameters:
  • specifier (Union[str, XASystemEventsApplication.ObjectType]) – The classname of the object to create

  • properties (dict) – The properties to give the object

  • data (Any, optional) – The data to give the object, defaults to None

Returns:

A PyXA wrapped form of the object

Return type:

XABase.XAObject

New in version 0.1.0.

property movies_folder: XAFolder

The user’s Movies folder.

property music_folder: XAFolder

The user’s Music folder.

property name: str

The name of the application.

property network_domain: XANetworkDomainObject

The collection of folders residing on the Network.

property network_preferences: XASystemEventsNetworkPreferencesObject

The preferences for the current user’s network.

property pictures_folder: XAFolder

The user’s Pictures folder.

property preferences_folder: XAFolder

The user’s Preferences folder.

processes(filter: dict | None = None) XASystemEventsProcessList | None[source]

Returns a list of processes, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned processes will have, or None

Returns:

The list of processes

Return type:

XASystemEventsProcessList

New in version 0.1.0.

property_list_files(filter: dict | None = None) XASystemEventsPropertyListFileList | None[source]

Returns a list of property list files, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned property list files will have, or None

Returns:

The list of property list files

Return type:

XASystemEventsPropertyListFileList

New in version 0.1.0.

property_list_items(filter: dict | None = None) XASystemEventsPropertyListItemList | None[source]

Returns a list of property list items, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned property list items will have, or None

Returns:

The list of property list items

Return type:

XASystemEventsPropertyListItemList

New in version 0.1.0.

property public_folder: XAFolder

The user’s Public folder.

property quit_delay: int

The time in seconds the application will idle before quitting; if set to zero, idle time will not cause the application to quit.

restart(state_saving_preference: bool = False)[source]

Restarts the computer.

Parameters:

state_saving_preference (bool, optional) – Whether the user defined state saving preference is followed, defaults to False (always saved)

New in version 0.1.0.

property screen_saver_preferences: XASystemEventsScreenSaverPreferencesObject

The preferences common to all screen savers.

screen_savers(filter: dict | None = None) XASystemEventsScreenSaverList | None[source]

Returns a list of screen savers, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned screen savers will have, or None

Returns:

The list of screen savers

Return type:

XASystemEventsScreenSaverList

New in version 0.1.0.

property script_menu_enabled: bool

Is the Script menu installed in the menu bar?

property scripting_additions_folder: XAFolder

The Scripting Additions folder.

property scripting_definition: XASystemEventsScriptingDefinitionObject

The scripting definition of the System Events application.

property scripts_folder: XAFolder

The user’s Scripts folder.

property security_preferences: XASystemEventsSecurityPreferencesObject

A collection of security preferences.

property shared_documents_folder: XAFolder

The Shared Documents folder.

shut_down(state_saving_preference: bool = False)[source]

Shuts down the computer.

Parameters:

state_saving_preference (bool, optional) – Whether the user defined state saving preference is followed, defaults to False (always saved)

New in version 0.1.0.

property sites_folder: XAFolder

The user’s Sites folder.

sleep()[source]

Puts the computer to sleep.

New in version 0.1.0.

property speakable_items_folder: XAFolder

The Speakable Items folder.

property startup_disk: XADisk

The disk from which Mac OS X was loaded.

property system_domain: XASystemDomainObject

The collection of folders belonging to the System.

property temporary_items_folder: XAFolder

The Temporary Items folder.

property trash: XAFolder

The user’s Trash folder.

ui_elements(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of UI elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned UI elements will have, or None

Returns:

The list of UI elements

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property ui_elements_enabled: bool

Are UI element events currently being processed?

property user_domain: XAUserDomainObject

The collection of folders belonging to the User.

users(filter: dict | None = None) XASystemEventsUserList | None[source]

Returns a list of users, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned users will have, or None

Returns:

The list of users

Return type:

XASystemEventsUserList

New in version 0.1.0.

property utilities_folder: XAFolder

The Utilities folder.

property version: str

The version number of the application.

property workflows_folder: XAFolder

The Automator Workflows folder.

xml_datas(filter: dict | None = None) XASystemEventsXMLDataList | None[source]

Returns a list of XML datas, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned XML datas will have, or None

Returns:

The list of XML datas

Return type:

XASystemEventsXMLDataList

New in version 0.1.0.

xml_files(filter: dict | None = None) XASystemEventsXMLFileList | None[source]

Returns a list of XML files, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned XML files will have, or None

Returns:

The list of XML files

Return type:

XASystemEventsXMLFileList

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsApplicationProcess(properties)[source]

Bases: XASystemEventsProcess

A process launched from an application file.

New in version 0.1.0.

Attributes:

application_file

A reference to the application file from which this process was launched.

property application_file: XAFile

A reference to the application file from which this process was launched.

class PyXA.apps.SystemEvents.XASystemEventsApplicationProcessList(properties: dict, filter: dict | None = None)[source]

Bases: XASystemEventsProcessList

A wrapper around lists of application processes that employs fast enumeration techniques.

All properties of application processes can be called as methods on the wrapped list, returning a list containing each process’ value for the property.

New in version 0.1.0.

Methods:

application_file()

by_application_file(application_file)

application_file() XAFileList[source]
by_application_file(application_file: XAFile) XASystemEventsApplicationProcess | None[source]
class PyXA.apps.SystemEvents.XASystemEventsAttribute(properties)[source]

Bases: XAObject

A named data value associated with the UI element.

New in version 0.1.0.

Attributes:

name

The name of the attribute.

settable

Can the attribute be set?

value

The current value of the attribute.

property name: str

The name of the attribute.

property settable: bool

Can the attribute be set?

property value: Any

The current value of the attribute.

class PyXA.apps.SystemEvents.XASystemEventsAttributeList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of attributes that employs fast enumeration techniques.

All properties of attributes can be called as methods on the wrapped list, returning a list containing each attribute’s value for the property.

New in version 0.1.0.

Methods:

by_name(name)

by_settable(settable)

by_value(value)

name()

settable()

value()

by_name(name: str) XASystemEventsAttribute | None[source]
by_settable(settable: bool) XASystemEventsAttribute | None[source]
by_value(value: Any) XASystemEventsAttribute | None[source]
name() list[str][source]
settable() list[bool][source]
value() Any[source]
class PyXA.apps.SystemEvents.XASystemEventsCDAndDVDPreferencesObject(properties)[source]

Bases: XAObject

The user’s CD and DVD insertion preferences.

New in version 0.1.0.

Attributes:

blank_bd

The blank BD insertion preference.

blank_cd

The blank CD insertion preference.

blank_dvd

The blank DVD insertion preference.

music_cd

The music CD insertion preference.

picture_cd

The picture CD insertion preference.

video_bd

The video BD insertion preference.

video_dvd

The video DVD insertion preference.

property blank_bd: XASystemEventsInsertionPreference

The blank BD insertion preference.

property blank_cd: XASystemEventsInsertionPreference

The blank CD insertion preference.

property blank_dvd: XASystemEventsInsertionPreference

The blank DVD insertion preference.

property music_cd: XASystemEventsInsertionPreference

The music CD insertion preference.

property picture_cd: XASystemEventsInsertionPreference

The picture CD insertion preference.

property video_bd: XASystemEventsInsertionPreference

The video BD insertion preference.

property video_dvd: XASystemEventsInsertionPreference

The video DVD insertion preference.

class PyXA.apps.SystemEvents.XASystemEventsConfiguration(properties)[source]

Bases: XAObject

A collection of settings for configuring a connection.

New in version 0.1.0.

Attributes:

account_name

The name used to authenticate.

connected

Is the configuration connected?

id

The unique identifier for the configuration.

name

The name of the configuration.

Methods:

connect()

Connects the configuration.

disconnect()

Disconnects the configuration.

property account_name: str

The name used to authenticate.

connect() XASystemEventsConfiguration[source]

Connects the configuration.

Returns:

The configuration object

Return type:

XASystemEventsConfiguration

New in version 0.1.0.

property connected: bool

Is the configuration connected?

disconnect() XASystemEventsConfiguration[source]

Disconnects the configuration.

Returns:

The configuration object

Return type:

XASystemEventsConfiguration

New in version 0.1.0.

property id: str

The unique identifier for the configuration.

property name: str

The name of the configuration.

class PyXA.apps.SystemEvents.XASystemEventsConfigurationList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of configurations that employs fast enumeration techniques.

All properties of configurations can be called as methods on the wrapped list, returning a list containing each configuration’s value for the property.

New in version 0.1.0.

Methods:

account_name()

by_account_name(account_name)

by_connected(connected)

by_id(id)

by_name(name)

connected()

id()

name()

account_name() list[str][source]
by_account_name(account_name: str) XASystemEventsConfiguration | None[source]
by_connected(connected: bool) XASystemEventsConfiguration | None[source]
by_id(id: str) XASystemEventsConfiguration | None[source]
by_name(name: str) XASystemEventsConfiguration | None[source]
connected() list[bool][source]
id() list[str][source]
name() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsDeskAccessoryProcess(properties)[source]

Bases: XASystemEventsProcess

A process launched from an desk accessory file.

New in version 0.1.0.

Attributes:

desk_accessory_file

A reference to the desk accessory file from which this process was launched.

property desk_accessory_file: XAAlias

A reference to the desk accessory file from which this process was launched.

class PyXA.apps.SystemEvents.XASystemEventsDeskAccessoryProcessList(properties: dict, filter: dict | None = None)[source]

Bases: XASystemEventsProcessList

A wrapper around lists of desk accessory processes that employs fast enumeration techniques.

All properties of desk accessory processes can be called as methods on the wrapped list, returning a list containing each process’ value for the property.

New in version 0.1.0.

Methods:

by_desk_accessory_file(desk_accessory_file)

desk_accessory_file()

by_desk_accessory_file(desk_accessory_file: XAFile) XASystemEventsDeskAccessoryProcess | None[source]
desk_accessory_file() XAFileList[source]
class PyXA.apps.SystemEvents.XASystemEventsDesktop(properties)[source]

Bases: XAObject

Desktop picture settings for desktops belonging to the user.

New in version 0.1.0.

Attributes:

change_interval

The number of seconds to wait between changing the desktop picture.

display_name

The name of display on which this desktop appears.

dynamic_style

The desktop picture dynamic style.

id

The unique identifier of the desktop.

name

The name of the desktop.

picture

The path to file used as desktop picture.

picture_rotation

Never, using interval, using login, after sleep.

pictures_folder

The path to folder containing pictures for changing desktop background.

random_order

Turn on for random ordering of changing desktop pictures.

translucent_menu_bar

Indicates whether the menu bar is translucent.

transluscent_menu_bar

Indicates whether the menu bar is translucent.

property change_interval: float

The number of seconds to wait between changing the desktop picture.

property display_name: str

The name of display on which this desktop appears.

property dynamic_style: DynamicStyle

The desktop picture dynamic style.

property id: int

The unique identifier of the desktop.

property name: str

The name of the desktop.

property picture: XAPath

The path to file used as desktop picture.

property picture_rotation: PictureRotation

Never, using interval, using login, after sleep.

property pictures_folder: XAPath

The path to folder containing pictures for changing desktop background.

property random_order: bool

Turn on for random ordering of changing desktop pictures.

property translucent_menu_bar: bool

Indicates whether the menu bar is translucent.

property transluscent_menu_bar: bool

Indicates whether the menu bar is translucent.

class PyXA.apps.SystemEvents.XASystemEventsDesktopList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of desktops that employs fast enumeration techniques.

All properties of desktops can be called as methods on the wrapped list, returning a list containing each desktop’s value for the property.

New in version 0.1.0.

Methods:

by_change_interval(change_interval)

by_display_name(display_name)

by_dynamic_style(dynamic_style)

by_id(id)

by_name(name)

by_picture(picture)

by_picture_rotation(picture_rotation)

by_pictures_folder(pictures_folder)

by_random_order(random_order)

by_translucent_menu_bar(translucent_menu_bar)

change_interval()

display_name()

dynamic_style()

id()

name()

picture()

picture_rotation()

pictures_folder()

random_folder()

translucent_menu_bar()

by_change_interval(change_interval: float) XASystemEventsDesktop | None[source]
by_display_name(display_name: str) XASystemEventsDesktop | None[source]
by_dynamic_style(dynamic_style: DynamicStyle) XASystemEventsDesktop | None[source]
by_id(id: int) XASystemEventsDesktop | None[source]
by_name(name: str) XASystemEventsDesktop | None[source]
by_picture(picture: XAPath | str) XASystemEventsDesktop | None[source]
by_picture_rotation(picture_rotation: PictureRotation) XASystemEventsDesktop | None[source]
by_pictures_folder(pictures_folder: XAPath | str) XASystemEventsDesktop | None[source]
by_random_order(random_order: bool) XASystemEventsDesktop | None[source]
by_translucent_menu_bar(translucent_menu_bar: bool) XASystemEventsDesktop | None[source]
change_interval() list[float][source]
display_name() list[str][source]
dynamic_style() list[DynamicStyle][source]
id() list[int][source]
name() list[str][source]
picture() list[XAPath][source]
picture_rotation() list[PictureRotation][source]
pictures_folder() list[XAPath][source]
random_folder() list[bool][source]
translucent_menu_bar() list[bool][source]
class PyXA.apps.SystemEvents.XASystemEventsDockPreferencesObject(properties)[source]

Bases: XAObject

The current user’s dock preferences.

New in version 0.1.0.

Attributes:

animate

Is the animation of opening applications on or off?

autohide

Is autohiding the dock on or off?

autohide_menu_bar

Is autohiding the menu bar on or off?

dock_size

Size/height of the items (between 0.0 (minimum) and 1.0 (maximum)).

double_click_behavior

Behavior when double clicking window a title bar.

magnification

Is magnification on or off?

magnification_size

Maximum magnification size when magnification is on (between 0.0 (minimum) and 1.0 (maximum)).

minimize_effect

Minimization effect.

minimize_into_application

Minimize window into its application?

screen_edge

Location on screen.

show_indicators

Show indicators for open applications?

show_recents

Show recent applications?

property animate: bool

Is the animation of opening applications on or off?

property autohide: bool

Is autohiding the dock on or off?

property autohide_menu_bar: bool

Is autohiding the menu bar on or off?

property dock_size: float

Size/height of the items (between 0.0 (minimum) and 1.0 (maximum)).

property double_click_behavior: DoubleClickBehavior

Behavior when double clicking window a title bar.

property magnification: bool

Is magnification on or off?

property magnification_size: float

Maximum magnification size when magnification is on (between 0.0 (minimum) and 1.0 (maximum)).

property minimize_effect: MinimizeEffect

Minimization effect.

property minimize_into_application: bool

Minimize window into its application?

property screen_edge: ScreenLocation

Location on screen.

property show_indicators: bool

Show indicators for open applications?

property show_recents: bool

Show recent applications?

class PyXA.apps.SystemEvents.XASystemEventsDocument(properties)[source]

Bases: XAObject, XACloseable, XAPrintable

A document of System Events.app.

New in version 0.1.0.

Attributes:

file

Its location on disk, if it has one.

modified

Has it been modified since the last save?

name

Its name.

Methods:

save([path])

Saves the document at the specified file path.

property file: XAFile

Its location on disk, if it has one.

property modified: bool

Has it been modified since the last save?

property name: str

Its name.

save(path: XAPath | str | None = None)[source]

Saves the document at the specified file path.

Parameters:

path (Union[str, XABase.XAPath, None], optional) – The path to save the document at, defaults to None

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsDocumentList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of documents that employs fast enumeration techniques.

All properties of documents can be called as methods on the wrapped list, returning a list containing each document’s value for the property.

New in version 0.1.0.

Methods:

by_file(file)

by_modified(modified)

by_name(name)

file()

modified()

name()

by_file(file: XAFile) XASystemEventsDocument | None[source]
by_modified(modified: bool) XASystemEventsDocument | None[source]
by_name(name: str) XASystemEventsDocument | None[source]
file() XAFileList[source]
modified() list[bool][source]
name() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsFolderAction(properties)[source]

Bases: XAObject

An action attached to a folder in the file system.

New in version 0.1.0.

Methods:

enable()

Enables the folder action.

scripts([filter])

Returns a list of scripts, as PyXA-wrapped objects, matching the given filter.

Attributes:

enabled

Is the folder action enabled?

name

The name of the folder action, which is also the name of the folder.

path

The path to the folder to which the folder action applies.

volume

The volume on which the folder to which the folder action applies resides.

enable()[source]

Enables the folder action.

New in version 0.1.0.

property enabled: bool

Is the folder action enabled?

property name: str

The name of the folder action, which is also the name of the folder.

property path: str

The path to the folder to which the folder action applies.

scripts(filter: dict | None = None) XASystemEventsScriptList | None[source]

Returns a list of scripts, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripts will have, or None

Returns:

The list of scripts

Return type:

XASystemEventsScriptList

New in version 0.1.0.

property volume: str

The volume on which the folder to which the folder action applies resides.

class PyXA.apps.SystemEvents.XASystemEventsFolderActionList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of folder actions that employs fast enumeration techniques.

All properties of folder actions can be called as methods on the wrapped list, returning a list containing each actions’s value for the property.

New in version 0.1.0.

Methods:

by_enabled(enabled)

by_name(name)

by_path(path)

by_volume(volume)

enabled()

name()

path()

volume()

by_enabled(enabled: bool) XABase.XAFolderAction | None[source]
by_name(name: str) XABase.XAFolderAction | None[source]
by_path(path: XAPath | str) XABase.XAFolderAction | None[source]
by_volume(volume: str) XABase.XAFolderAction | None[source]
enabled() list[bool][source]
name() list[str][source]
path() list[XAPath][source]
volume() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsInsertionPreference(properties)[source]

Bases: XAObject

A specific insertion preference.

New in version 0.1.0.

Attributes:

custom_application

Application to launch or activate on the insertion of media.

custom_script

AppleScript to launch or activate on the insertion of media.

insertion_action

The action to perform on media insertion.

property custom_application: str | None

Application to launch or activate on the insertion of media.

property custom_script: str | None

AppleScript to launch or activate on the insertion of media.

property insertion_action: MediaInsertionAction

The action to perform on media insertion.

class PyXA.apps.SystemEvents.XASystemEventsInterface(properties)[source]

Bases: XAObject

A collection of settings for a network interface.

New in version 0.1.0.

Attributes:

automatic

Configure the interface speed, duplex, and mtu automatically?

duplex

The duplex setting half | full | full with flow control.

id

The unique identifier for the interface.

kind

The type of interface.

mac_address

The MAC address for the interface.

mtu

The packet size.

name

The name of the interface.

speed

Ethernet speed 10 | 100 | 1000.

property automatic: bool

Configure the interface speed, duplex, and mtu automatically?

property duplex: str

The duplex setting half | full | full with flow control.

property id: str

The unique identifier for the interface.

property kind: str

The type of interface.

property mac_address: str

The MAC address for the interface.

property mtu: int

The packet size.

property name: str

The name of the interface.

property speed: int

Ethernet speed 10 | 100 | 1000.

class PyXA.apps.SystemEvents.XASystemEventsInterfaceList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of network interfaces that employs fast enumeration techniques.

All properties of interfaces can be called as methods on the wrapped list, returning a list containing each interfaces’s value for the property.

New in version 0.1.0.

Methods:

automatic()

by_automatic(automatic)

by_duplex(duplex)

by_id(id)

by_kind(kind)

by_mac_address(mac_address)

by_mtu(mtu)

by_name(name)

by_speed(speed)

duplex()

id()

kind()

mac_address()

mtu()

name()

speed()

automatic() list[bool][source]
by_automatic(automatic: bool) XASystemEventsInterface | None[source]
by_duplex(duplex: str) XASystemEventsInterface | None[source]
by_id(id: str) XASystemEventsInterface | None[source]
by_kind(kind: str) XASystemEventsInterface | None[source]
by_mac_address(mac_address: str) XASystemEventsInterface | None[source]
by_mtu(mtu: int) XASystemEventsInterface | None[source]
by_name(name: str) XASystemEventsInterface | None[source]
by_speed(speed: int) XASystemEventsInterface | None[source]
duplex() list[str][source]
id() list[str][source]
kind() list[str][source]
mac_address() list[str][source]
mtu() list[str][source]
name() list[str][source]
speed() list[int][source]
class PyXA.apps.SystemEvents.XASystemEventsLocation(properties)[source]

Bases: XAObject

A set of services.

New in version 0.1.0.

Attributes:

id

The unique identifier for the location.

name

The name of the location.

property id: str

The unique identifier for the location.

property name: str

The name of the location.

class PyXA.apps.SystemEvents.XASystemEventsLocationList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of service locations that employs fast enumeration techniques.

All properties of locations can be called as methods on the wrapped list, returning a list containing each location’s value for the property.

New in version 0.1.0.

Methods:

by_id(id)

by_name(name)

id()

name()

by_id(id: str) XASystemEventsLocation | None[source]
by_name(name: str) XASystemEventsLocation | None[source]
id() list[str][source]
name() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsLoginItem(properties)[source]

Bases: XAObject

An item to be launched or opened at login.add()

New in version 0.1.0.

Methods:

delete()

Deletes the login item.

Attributes:

hidden

Is the Login Item hidden when launched?

kind

The file type of the Login Item.

name

The name of the Login Item.

path

The file system path to the Login Item.

delete()[source]

Deletes the login item.

New in version 0.1.0.

property hidden: bool

Is the Login Item hidden when launched?

property kind: str

The file type of the Login Item.

property name: str

The name of the Login Item.

property path: str

The file system path to the Login Item.

class PyXA.apps.SystemEvents.XASystemEventsLoginItemList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of login items that employs fast enumeration techniques.

All properties of property login items can be called as methods on the wrapped list, returning a list containing each login item’s value for the property.

New in version 0.1.0.

Methods:

by_hidden(hidden)

by_kind(kind)

by_name(name)

by_path(path)

hidden()

kind()

name()

path()

by_hidden(hidden: bool) XASystemEventsLoginItem | None[source]
by_kind(kind: str) XASystemEventsLoginItem | None[source]
by_name(name: str) XASystemEventsLoginItem | None[source]
by_path(path: XAPath | str) XASystemEventsLoginItem | None[source]
hidden() list[bool][source]
kind() list[str][source]
name() list[str][source]
path() list[XAPath][source]
class PyXA.apps.SystemEvents.XASystemEventsNetworkPreferencesObject(properties)[source]

Bases: XAObject

The preferences for the current user’s network.

New in version 0.1.0.

Attributes:

current_location

The current location.

Methods:

interfaces([filter])

Returns a list of interfaces, as PyXA-wrapped objects, matching the given filter.

locations([filter])

Returns a list of locations, as PyXA-wrapped objects, matching the given filter.

services([filter])

Returns a list of services, as PyXA-wrapped objects, matching the given filter.

property current_location: XASystemEventsLocation

The current location.

interfaces(filter: dict | None = None) XASystemEventsInterfaceList | None[source]

Returns a list of interfaces, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned interfaces will have, or None

Returns:

The list of interfaces

Return type:

XASystemEventsInterfaceList

New in version 0.1.0.

locations(filter: dict | None = None) XASystemEventsLocationList | None[source]

Returns a list of locations, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned locations will have, or None

Returns:

The list of locations

Return type:

XASystemEventsLocationList

New in version 0.1.0.

services(filter: dict | None = None) XASystemEventsServiceList | None[source]

Returns a list of services, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned services will have, or None

Returns:

The list of services

Return type:

XASystemEventsServiceList

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsPrintSettings(properties)[source]

Bases: XAObject

Settings for printing.

New in version 0.1.0.

Attributes:

collating

Should printed copies be collated?

copies

The number of copies of a document to be printed.

ending_page

The last page of the document to be printed.

error_handling

How should errors be handled?

fax_number

The target fax number.

pages_across

The number of logical pages laid across a physical page.

pages_down

The number of logical pages laid out down a physical page.

requested_print_time

The time at which the desktop printer should print the document.

starting_page

The first page of the document to be printed.

target_printer

The target printer.

property collating: bool

Should printed copies be collated?

property copies: int

The number of copies of a document to be printed.

property ending_page: int

The last page of the document to be printed.

property error_handling: PrintErrorHandling

How should errors be handled?

property fax_number: str

The target fax number.

property pages_across: int

The number of logical pages laid across a physical page.

property pages_down: int

The number of logical pages laid out down a physical page.

property requested_print_time: datetime

The time at which the desktop printer should print the document.

property starting_page: int

The first page of the document to be printed.

property target_printer: str

The target printer.

class PyXA.apps.SystemEvents.XASystemEventsProcess(properties)[source]

Bases: XASystemEventsUIElement

A process running on this computer.

New in version 0.1.0.

Attributes:

accepts_high_level_events

Is the process high-level event aware (accepts open application, open document, print document, and quit)?

accepts_remote_events

Does the process accept remote events?

architecture

The architecture in which the process is running.

background_only

Does the process run exclusively in the background?

bundle_identifier

The bundle identifier of the process' application file.

classic

Is the process running in the Classic environment?

creator_type

The OSType of the creator of the process (the signature).

displayed_name

The name of the file from which the process was launched, as displayed in the User Interface.

file

The file from which the process was launched.

file_type

The OSType of the file type of the process.

front_window

The front window of the application process.

frontmost

Is the process the frontmost process?

has_scripting_terminology

Does the process have a scripting terminology, i.e., can it be scripted?

id

The unique identifier of the process.

name

The name of the process.

partition_space_used

The number of bytes currently used in the process' partition.

short_name

The short name of the file from which the process was launched.

total_partition_size

The size of the partition with which the process was launched.

unix_id

The Unix process identifier of a process running in the native environment, or -1 for a process running in the Classic environment.

visible

Is the process' layer visible?

property accepts_high_level_events: bool

Is the process high-level event aware (accepts open application, open document, print document, and quit)?

property accepts_remote_events: bool

Does the process accept remote events?

property architecture: str

The architecture in which the process is running.

property background_only: bool

Does the process run exclusively in the background?

property bundle_identifier: str

The bundle identifier of the process’ application file.

property classic: bool

Is the process running in the Classic environment?

property creator_type: str

The OSType of the creator of the process (the signature).

property displayed_name: str

The name of the file from which the process was launched, as displayed in the User Interface.

property file: XAFile

The file from which the process was launched.

property file_type: str

The OSType of the file type of the process.

property front_window: XASBWindow

The front window of the application process.

property frontmost: bool

Is the process the frontmost process?

property has_scripting_terminology: bool

Does the process have a scripting terminology, i.e., can it be scripted?

property id: int

The unique identifier of the process.

property name: str

The name of the process.

property partition_space_used: int

The number of bytes currently used in the process’ partition.

property short_name: str | None

The short name of the file from which the process was launched.

property total_partition_size: int

The size of the partition with which the process was launched.

property unix_id: int

The Unix process identifier of a process running in the native environment, or -1 for a process running in the Classic environment.

property visible: bool

Is the process’ layer visible?

class PyXA.apps.SystemEvents.XASystemEventsProcessList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XASystemEventsUIElementList

A wrapper around lists of processes that employs fast enumeration techniques.

All properties of processes can be called as methods on the wrapped list, returning a list containing each process’ value for the property.

New in version 0.1.0.

Methods:

accepts_high_level_events()

accepts_remote_events()

architecture()

background_only()

bundle_identifier()

by_accepts_high_level_events(...)

by_accepts_remote_events(accepts_remote_events)

by_architecture(architecture)

by_background_only(background_only)

by_bundle_identifier(bundle_identifier)

by_classic(classic)

by_creator_type(creator_type)

by_displayed_name(displayed_name)

by_file(file)

by_file_type(file_type)

by_frontmost(frontmost)

by_has_scripting_terminology(...)

by_id(id)

by_name(name)

by_partition_space_used(partition_space_used)

by_short_name(short_name)

by_total_partition_size(total_partition_size)

by_unix_id(unix_id)

by_visible(visible)

classic()

creator_type()

displayed_name()

file()

file_type()

has_scripting_terminology()

id()

name()

partition_space_used()

short_name()

total_partition_size()

unix_id()

visible()

accepts_high_level_events() list[bool][source]
accepts_remote_events() list[bool][source]
architecture() list[str][source]
background_only() list[bool][source]
bundle_identifier() list[str][source]
by_accepts_high_level_events(accepts_high_level_events: bool) XASystemEventsProcess | None[source]
by_accepts_remote_events(accepts_remote_events: bool) XASystemEventsProcess | None[source]
by_architecture(architecture: str) XASystemEventsProcess | None[source]
by_background_only(background_only: bool) XASystemEventsProcess | None[source]
by_bundle_identifier(bundle_identifier: str) XASystemEventsProcess | None[source]
by_classic(classic: bool) XASystemEventsProcess | None[source]
by_creator_type(creator_type: str) XASystemEventsProcess | None[source]
by_displayed_name(displayed_name: str) XASystemEventsProcess | None[source]
by_file(file: XAFile) XASystemEventsProcess | None[source]
by_file_type(file_type: str) XASystemEventsProcess | None[source]
by_frontmost(frontmost: bool) XASystemEventsProcess | None[source]
by_has_scripting_terminology(has_scripting_terminology: str) XASystemEventsProcess | None[source]
by_id(id: str) XASystemEventsProcess | None[source]
by_name(name: str) XASystemEventsProcess | None[source]
by_partition_space_used(partition_space_used: int) XASystemEventsProcess | None[source]
by_short_name(short_name: str) XASystemEventsProcess | None[source]
by_total_partition_size(total_partition_size: int) XASystemEventsProcess | None[source]
by_unix_id(unix_id: str) XASystemEventsProcess | None[source]
by_visible(visible: bool) XASystemEventsProcess | None[source]
classic() list[bool][source]
creator_type() list[str][source]
displayed_name() list[str][source]
file() XAFileList[source]
file_type() list[str][source]
has_scripting_terminology() list[bool][source]
id() list[int][source]
name() list[str][source]
partition_space_used() list[int][source]
short_name() list[str][source]
total_partition_size() list[int][source]
unix_id() list[int][source]
visible() list[bool][source]
class PyXA.apps.SystemEvents.XASystemEventsPropertyListFile(properties)[source]

Bases: XAObject

A file containing data in Property List format.

New in version 0.1.0.

Attributes:

contents

The contents of the property list file; elements and properties of the property list item may be accessed as if they were elements and properties of the property list file.

property contents: XASystemEventsPropertyListItem

The contents of the property list file; elements and properties of the property list item may be accessed as if they were elements and properties of the property list file.

class PyXA.apps.SystemEvents.XASystemEventsPropertyListFileList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of property list files that employs fast enumeration techniques.

All properties of property list files can be called as methods on the wrapped list, returning a list containing each file’s value for the property.

New in version 0.1.0.

Methods:

by_content(contents)

contents()

by_content(contents: XASystemEventsPropertyListItemList) XASystemEventsPropertyListFile | None[source]
contents() XASystemEventsPropertyListItemList[source]
class PyXA.apps.SystemEvents.XASystemEventsPropertyListItem(properties)[source]

Bases: XAObject

A unit of data in Property List format.

New in version 0.1.0.

Attributes:

kind

The kind of data stored in the property list item: boolean/data/date/list/number/record/string.

name

The name of the property list item (if any).

text

The text representation of the property list data.

value

The value of the property list item.

Methods:

property_list_items([filter])

Returns a list of property list items, as PyXA-wrapped objects, matching the given filter.

property kind: str

The kind of data stored in the property list item: boolean/data/date/list/number/record/string.

property name: str

The name of the property list item (if any).

property_list_items(filter: dict | None = None) XASystemEventsPropertyListItemList | None[source]

Returns a list of property list items, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned property list items will have, or None

Returns:

The list of property list items

Return type:

XASystemEventsPropertyListItemList

New in version 0.1.0.

property text: str

The text representation of the property list data.

property value: Any

The value of the property list item.

class PyXA.apps.SystemEvents.XASystemEventsPropertyListItemList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of property list items that employs fast enumeration techniques.

All properties of property list items can be called as methods on the wrapped list, returning a list containing each item’s value for the property.

New in version 0.1.0.

Methods:

by_kind(kind)

by_name(name)

by_text(text)

by_value(value)

kind()

name()

text()

value()

by_kind(kind: str) XASystemEventsPropertyListItem | None[source]
by_name(name: str) XASystemEventsPropertyListItem | None[source]
by_text(text: str) XASystemEventsPropertyListItem | None[source]
by_value(value: Any) XASystemEventsPropertyListItem | None[source]
kind() list[str][source]
name() list[str][source]
text() list[str][source]
value() list[int | bool | datetime | dict | str | bytes][source]
class PyXA.apps.SystemEvents.XASystemEventsScreenSaver(properties)[source]

Bases: XAObject

An installed screen saver.

New in version 0.1.0.

Attributes:

displayedName

Name of the screen saver module as displayed to the user.

name

Name of the screen saver module to be displayed.

path

Path to the screen saver module.

picture_display_style

Effect to use when displaying picture-based screen savers (slideshow, collage, or mosaic).

Methods:

start()

Starts the screen saver.

stop()

Stops the screen saver.

property displayedName: str

Name of the screen saver module as displayed to the user.

property name: str

Name of the screen saver module to be displayed.

property path: XAAlias

Path to the screen saver module.

property picture_display_style: str

Effect to use when displaying picture-based screen savers (slideshow, collage, or mosaic).

start()[source]

Starts the screen saver.

New in version 0.1.0.

stop()[source]

Stops the screen saver.

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsScreenSaverList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of screen savers that employs fast enumeration techniques.

All properties of screen savers can be called as methods on the wrapped list, returning a list containing each screen saver’s value for the property.

New in version 0.1.0.

Methods:

by_displayed_name(displayed_name)

by_name(name)

by_path(path)

by_picture_display_style(picture_display_style)

displayed_name()

name()

path()

picture_display_style()

by_displayed_name(displayed_name: str) XASystemEventsScreenSaver | None[source]
by_name(name: str) XASystemEventsScreenSaver | None[source]
by_path(path: XAPath | str) XASystemEventsScreenSaver | None[source]
by_picture_display_style(picture_display_style: str) XASystemEventsScreenSaver | None[source]
displayed_name() list[str][source]
name() list[str][source]
path() list[XAPath][source]
picture_display_style() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsScreenSaverPreferencesObject(properties)[source]

Bases: XAObject

Screen saver settings.

New in version 0.1.0.

Attributes:

delay_interval

Number of seconds of idle time before the screen saver starts; zero for never.

main_screen_only

Should the screen saver be shown only on the main screen?

running

Is the screen saver running?

show_clock

Should a clock appear over the screen saver?

Methods:

start()

Starts the current screen saver.

stop()

Stops the current screen saver.

property delay_interval: int

Number of seconds of idle time before the screen saver starts; zero for never.

property main_screen_only: bool

Should the screen saver be shown only on the main screen?

property running: bool

Is the screen saver running?

property show_clock: bool

Should a clock appear over the screen saver?

start()[source]

Starts the current screen saver.

New in version 0.1.0.

stop()[source]

Stops the current screen saver.

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsScript(properties)[source]

Bases: XAObject

A script invoked by a folder action.

New in version 0.1.0.

Attributes:

enabled

Is the script enabled?

name

The name of the script.

path

The file system path of the disk.

posix_path

The POSIX file system path of the disk.

property enabled: bool

Is the script enabled?

property name: str

The name of the script.

property path: str

The file system path of the disk.

property posix_path: str

The POSIX file system path of the disk.

class PyXA.apps.SystemEvents.XASystemEventsScriptList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripts that employs fast enumeration techniques.

All properties of scripts can be called as methods on the wrapped list, returning a list containing each script’s value for the property.

New in version 0.1.0.

Methods:

by_enabled(enabled)

by_name(name)

by_path(path)

by_posix_path(posix_path)

enabled()

name()

path()

posix_path()

by_enabled(enabled: bool) XASystemEventsScript | None[source]
by_name(name: str) XASystemEventsScript | None[source]
by_path(path: XAPath | str) XASystemEventsScript | None[source]
by_posix_path(posix_path: str) XASystemEventsScript | None[source]
enabled() list[bool][source]
name() list[str][source]
path() list[XAPath][source]
posix_path() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsScriptingClass(properties)[source]

Bases: XAObject

A class within a suite within a scripting definition.

New in version 0.1.0.

Attributes:

hidden

Is the class hidden?

id

The unique identifier of the class.

name

The name of the class.

object_description

The description of the class.

plural_name

The plural name of the class.

suite_name

The name of the suite to which this class belongs.

superclass

The class from which this class inherits.

Methods:

scripting_elements([filter])

Returns a list of scripting elements, as PyXA-wrapped objects, matching the given filter.

scripting_properties([filter])

Returns a list of scripting properties, as PyXA-wrapped objects, matching the given filter.

property hidden: bool

Is the class hidden?

property id: str

The unique identifier of the class.

property name: str

The name of the class.

property object_description: str

The description of the class.

property plural_name: str

The plural name of the class.

scripting_elements(filter: dict | None = None) XASystemEventsScriptingElementList | None[source]

Returns a list of scripting elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripting elements will have, or None

Returns:

The list of scripting elements

Return type:

XASystemEventsScriptingElementList

New in version 0.1.0.

scripting_properties(filter: dict | None = None) XASystemEventsScriptingPropertyList | None[source]

Returns a list of scripting properties, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripting properties will have, or None

Returns:

The list of scripting properties

Return type:

XASystemEventsScriptingPropertyList

New in version 0.1.0.

property suite_name: str

The name of the suite to which this class belongs.

property superclass: XASystemEventsScriptingClass

The class from which this class inherits.

class PyXA.apps.SystemEvents.XASystemEventsScriptingClassList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting classes that employs fast enumeration techniques.

All properties of scripting classes can be called as methods on the wrapped list, returning a list containing each class’ value for the property.

New in version 0.1.0.

Methods:

by_hidden(hidden)

by_id(id)

by_name(name)

by_object_description(object_description)

by_plural_name(plural_name)

by_suite_name(suite_name)

by_superclass(superclass)

hidden()

id()

name()

object_description()

plural_name()

suite_name()

superclass()

by_hidden(hidden: bool) XASystemEventsScriptingClass | None[source]
by_id(id: str) XASystemEventsScriptingClass | None[source]
by_name(name: str) XASystemEventsScriptingClass | None[source]
by_object_description(object_description: str) XASystemEventsScriptingClass | None[source]
by_plural_name(plural_name: str) XASystemEventsScriptingClass | None[source]
by_suite_name(suite_name: str) XASystemEventsScriptingClass | None[source]
by_superclass(superclass: XASystemEventsScriptingClass) XASystemEventsScriptingClass | None[source]
hidden() list[bool][source]
id() list[str][source]
name() list[str][source]
object_description() list[str][source]
plural_name() list[str][source]
suite_name() list[str][source]
superclass() XASystemEventsScriptingClassList[source]
class PyXA.apps.SystemEvents.XASystemEventsScriptingCommand(properties)[source]

Bases: XAObject

A command within a suite within a scripting definition.

New in version 0.1.0.

Attributes:

direct_parameter

The direct parameter of the command.

hidden

Is the command hidden?

id

The unique identifier of the command.

name

The name of the command.

object_description

The description of the command.

scripting_result

The object or data returned by this command.

suite_name

The name of the suite to which this command belongs.

Methods:

scripting_parameters([filter])

Returns a list of scripting parameters, as PyXA-wrapped objects, matching the given filter.

property direct_parameter: XASystemEventsScriptingParameter

The direct parameter of the command.

property hidden: bool

Is the command hidden?

property id: str

The unique identifier of the command.

property name: str

The name of the command.

property object_description: str

The description of the command.

scripting_parameters(filter: dict | None = None) XASystemEventsScriptingParameterList | None[source]

Returns a list of scripting parameters, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripting parameters will have, or None

Returns:

The list of scripting parameters

Return type:

XASystemEventsScriptingParameterList

New in version 0.1.0.

property scripting_result: XASystemEventsScriptingResultObject

The object or data returned by this command.

property suite_name: str

The name of the suite to which this command belongs.

class PyXA.apps.SystemEvents.XASystemEventsScriptingCommandList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting commands that employs fast enumeration techniques.

All properties of scripting commands can be called as methods on the wrapped list, returning a list containing each command’s value for the property.

New in version 0.1.0.

Methods:

by_direct_parameter(direct_parameter)

by_hidden(hidden)

by_id(id)

by_name(name)

by_object_description(object_description)

by_scripting_result(scripting_result)

by_suite_name(suite_name)

direct_parameter()

hidden()

id()

name()

object_description()

scripting_result()

suite_name()

by_direct_parameter(direct_parameter: XASystemEventsScriptingParameter) XASystemEventsScriptingCommand | None[source]
by_hidden(hidden: bool) XASystemEventsScriptingCommand | None[source]
by_id(id: str) XASystemEventsScriptingCommand | None[source]
by_name(name: str) XASystemEventsScriptingCommand | None[source]
by_object_description(object_description: str) XASystemEventsScriptingCommand | None[source]
by_scripting_result(scripting_result: XASystemEventsScriptingResultObject) XASystemEventsScriptingCommand | None[source]
by_suite_name(suite_name: str) XASystemEventsScriptingCommand | None[source]
direct_parameter() XASystemEventsScriptingParameterList[source]
hidden() list[str][source]
id() list[str][source]
name() list[str][source]
object_description() list[str][source]
scripting_result() XASystemEventsScriptingResultObjectList[source]
suite_name() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsScriptingDefinitionObject(properties)[source]

Bases: XAObject

The scripting definition of the System Events application.

New in version 0.1.0.

Methods:

scripting_suites([filter])

Returns a list of scripting suites, as PyXA-wrapped objects, matching the given filter.

scripting_suites(filter: dict | None = None) XASystemEventsScriptingSuiteList | None[source]

Returns a list of scripting suites, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripting suites will have, or None

Returns:

The list of scripting suites

Return type:

XASystemEventsScriptingSuiteList

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsScriptingElement(properties)[source]

Bases: XASystemEventsScriptingClass

An element within a class within a suite within a scripting definition.

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsScriptingElementList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting elements that employs fast enumeration techniques.

All properties of scripting elements can be called as methods on the wrapped list, returning a list containing each element’s value for the property.

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsScriptingEnumeration(properties)[source]

Bases: XAObject

An enumeration within a suite within a scripting definition.

New in version 0.1.0.

Attributes:

hidden

Is the enumeration hidden?

id

The unique identifier of the enumeration.

name

The name of the enumeration.

Methods:

scripting_enumerators([filter])

Returns a list of scripting enumerators, as PyXA-wrapped objects, matching the given filter.

property hidden: bool

Is the enumeration hidden?

property id: str

The unique identifier of the enumeration.

property name: str

The name of the enumeration.

scripting_enumerators(filter: dict | None = None) XASystemEventsScriptingEnumeratorList | None[source]

Returns a list of scripting enumerators, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripting enumerators will have, or None

Returns:

The list of scripting enumerators

Return type:

XASystemEventsScriptingEnumeratorList

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsScriptingEnumerationList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting enumerations that employs fast enumeration techniques.

All properties of scripting enumerations can be called as methods on the wrapped list, returning a list containing each enumerations’s value for the property.

New in version 0.1.0.

Methods:

by_hidden(hidden)

by_id(id)

by_name(name)

hidden()

id()

name()

by_hidden(hidden: bool) XASystemEventsScriptingEnumeration | None[source]
by_id(id: str) XASystemEventsScriptingEnumeration | None[source]
by_name(name: str) XASystemEventsScriptingEnumeration | None[source]
hidden() list[str][source]
id() list[str][source]
name() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsScriptingEnumerator(properties)[source]

Bases: XAObject

An enumerator within an enumeration within a suite within a scripting definition.

New in version 0.1.0.

Attributes:

hidden

Is the enumerator hidden?

id

The unique identifier of the enumerator.

name

The name of the enumerator.

object_description

The description of the enumerator.

property hidden: bool

Is the enumerator hidden?

property id: str

The unique identifier of the enumerator.

property name: str

The name of the enumerator.

property object_description: str

The description of the enumerator.

class PyXA.apps.SystemEvents.XASystemEventsScriptingEnumeratorList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting enumerators that employs fast enumeration techniques.

All properties of scripting enumerators can be called as methods on the wrapped list, returning a list containing each enumerator’s value for the property.

New in version 0.1.0.

Methods:

by_hidden(hidden)

by_id(id)

by_name(name)

by_object_description(object_description)

hidden()

id()

name()

object_description()

by_hidden(hidden: bool) XASystemEventsScriptingEnumerator | None[source]
by_id(id: str) XASystemEventsScriptingEnumerator | None[source]
by_name(name: str) XASystemEventsScriptingEnumerator | None[source]
by_object_description(object_description: str) XASystemEventsScriptingEnumerator | None[source]
hidden() list[str][source]
id() list[str][source]
name() list[str][source]
object_description() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsScriptingParameter(properties)[source]

Bases: XAObject

A parameter within a command within a suite within a scripting definition.

New in version 0.1.0.

Attributes:

hidden

Is the parameter hidden?

id

The unique identifier of the parameter.

kind

The kind of object or data specified by this parameter.

name

The name of the parameter.

object_description

The description of the parameter.

optional

Is the parameter optional?

property hidden: bool

Is the parameter hidden?

property id: str

The unique identifier of the parameter.

property kind: str

The kind of object or data specified by this parameter.

property name: str

The name of the parameter.

property object_description: str

The description of the parameter.

property optional: bool

Is the parameter optional?

class PyXA.apps.SystemEvents.XASystemEventsScriptingParameterList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting parameters that employs fast enumeration techniques.

All properties of scripting parameters can be called as methods on the wrapped list, returning a list containing each parameter’s value for the property.

New in version 0.1.0.

Methods:

by_hidden(hidden)

by_id(id)

by_kind(kind)

by_name(name)

by_object_description(object_description)

by_optional(optional)

hidden()

id()

kind()

name()

object_description()

optional()

by_hidden(hidden: bool) XASystemEventsScriptingParameter | None[source]
by_id(id: str) XASystemEventsScriptingParameter | None[source]
by_kind(kind: str) XASystemEventsScriptingParameter | None[source]
by_name(name: str) XASystemEventsScriptingParameter | None[source]
by_object_description(object_description: str) XASystemEventsScriptingParameter | None[source]
by_optional(optional: bool) XASystemEventsScriptingParameter | None[source]
hidden() list[bool][source]
id() list[str][source]
kind() list[str][source]
name() list[str][source]
object_description() list[str][source]
optional() list[bool][source]
class PyXA.apps.SystemEvents.XASystemEventsScriptingProperty(properties)[source]

Bases: XAObject

A property within a class within a suite within a scripting definition.

New in version 0.1.0.

Attributes:

access

The type of access to this property.

enumerated

Is the property's value an enumerator?

hidden

Is the property hidden?

id

The unique identifier of the property.

kind

The kind of object or data returned by this property.

listed

Is the property's value a list?

name

The name of the property.

object_description

The description of the property.

property access: AccessRight

The type of access to this property.

property enumerated: bool

Is the property’s value an enumerator?

property hidden: bool

Is the property hidden?

property id: str

The unique identifier of the property.

property kind: str

The kind of object or data returned by this property.

property listed: bool

Is the property’s value a list?

property name: str

The name of the property.

property object_description: str

The description of the property.

class PyXA.apps.SystemEvents.XASystemEventsScriptingPropertyList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting properties that employs fast enumeration techniques.

All properties of scripting properties can be called as methods on the wrapped list, returning a list containing each scripting property’s value for the property.

New in version 0.1.0.

Methods:

access()

by_access(access)

by_enumerated(enumerated)

by_hidden(hidden)

by_id(id)

by_kind(kind)

by_listed(listed)

by_name(name)

by_object_description(object_description)

enumerated()

hidden()

id()

kind()

listed()

name()

object_description()

access() list[AccessRight][source]
by_access(access: AccessRight) XASystemEventsScriptingProperty | None[source]
by_enumerated(enumerated: bool) XASystemEventsScriptingProperty | None[source]
by_hidden(hidden: bool) XASystemEventsScriptingProperty | None[source]
by_id(id: str) XASystemEventsScriptingProperty | None[source]
by_kind(kind: str) XASystemEventsScriptingProperty | None[source]
by_listed(listed: bool) XASystemEventsScriptingProperty | None[source]
by_name(name: str) XASystemEventsScriptingProperty | None[source]
by_object_description(object_description: str) XASystemEventsScriptingProperty | None[source]
enumerated() list[bool][source]
hidden() list[str][source]
id() list[str][source]
kind() list[str][source]
listed() list[bool][source]
name() list[str][source]
object_description() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsScriptingResultObject(properties)[source]

Bases: XAObject

The result of a command within a suite within a scripting definition.

New in version 0.1.0.

Attributes:

enumerated

Is the scripting result's value an enumerator?

kind

The kind of object or data returned by this property.

listed

Is the scripting result's value a list?

object_description

The description of the property.

property enumerated: bool

Is the scripting result’s value an enumerator?

property kind: str

The kind of object or data returned by this property.

property listed: bool

Is the scripting result’s value a list?

property object_description: str

The description of the property.

class PyXA.apps.SystemEvents.XASystemEventsScriptingResultObjectList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting result objects that employs fast enumeration techniques.

All properties of scripting result objects can be called as methods on the wrapped list, returning a list containing each result’s value for the property.

New in version 0.1.0.

Methods:

by_enumerated(enumerated)

by_kind(kind)

by_listed(listed)

by_object_description(object_description)

enumerated()

kind()

listed()

object_description()

by_enumerated(enumerated: bool) XASystemEventsScriptingResultObject | None[source]
by_kind(kind: str) XASystemEventsScriptingResultObject | None[source]
by_listed(listed: bool) XASystemEventsScriptingResultObject | None[source]
by_object_description(object_description: str) XASystemEventsScriptingResultObject | None[source]
enumerated() list[bool][source]
kind() list[str][source]
listed() list[bool][source]
object_description() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsScriptingSuite(properties)[source]

Bases: XAObject

A suite within a scripting definition.

New in version 0.1.0.

Attributes:

hidden

Is the suite hidden?

id

The unique identifier of the suite.

name

The name of the suite.

object_description

The description of the suite.

Methods:

scripting_classes([filter])

Returns a list of scripting classes, as PyXA-wrapped objects, matching the given filter.

scripting_commands([filter])

Returns a list of scripting commands, as PyXA-wrapped objects, matching the given filter.

scripting_enumerations([filter])

Returns a list of scripting enumerations, as PyXA-wrapped objects, matching the given filter.

property hidden: bool

Is the suite hidden?

property id: str

The unique identifier of the suite.

property name: str

The name of the suite.

property object_description: str

The description of the suite.

scripting_classes(filter: dict | None = None) XASystemEventsScriptingClassList | None[source]

Returns a list of scripting classes, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripting classes will have, or None

Returns:

The list of scripting classes

Return type:

XASystemEventsScriptingClassList

New in version 0.1.0.

scripting_commands(filter: dict | None = None) XASystemEventsScriptingCommandList | None[source]

Returns a list of scripting commands, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripting commands will have, or None

Returns:

The list of scripting commands

Return type:

XASystemEventsScriptingCommandList

New in version 0.1.0.

scripting_enumerations(filter: dict | None = None) XASystemEventsScriptingEnumerationList | None[source]

Returns a list of scripting enumerations, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned scripting enumerations will have, or None

Returns:

The list of scripting enumerations

Return type:

XASystemEventsScriptingEnumerationList

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsScriptingSuiteList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of scripting suites that employs fast enumeration techniques.

All properties of scripting suites can be called as methods on the wrapped list, returning a list containing each suite’s value for the property.

New in version 0.1.0.

Methods:

by_hidden(hidden)

by_id(id)

by_name(name)

by_object_description(object_description)

hidden()

id()

name()

object_description()

by_hidden(hidden: bool) XASystemEventsScriptingSuite | None[source]
by_id(id: str) XASystemEventsScriptingSuite | None[source]
by_name(name: str) XASystemEventsScriptingSuite | None[source]
by_object_description(object_description: str) XASystemEventsScriptingSuite | None[source]
hidden() list[bool][source]
id() list[str][source]
name() list[str][source]
object_description() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsSecurityPreferencesObject(properties)[source]

Bases: XAObject

A collection of security preferences.

New in version 0.1.0.

Attributes:

automatic_login

Is automatic login allowed?

log_out_when_inactive

Will the computer log out when inactive?

log_out_when_inactive_interval

The interval of inactivity after which the computer will log out.

require_password_to_unlock

Is a password required to unlock secure preferences?

require_password_to_wake

Is a password required to wake the computer from sleep or screen saver?

secure_virtual_memory

Is secure virtual memory being used?

property automatic_login: bool

Is automatic login allowed?

property log_out_when_inactive: bool

Will the computer log out when inactive?

property log_out_when_inactive_interval: int

The interval of inactivity after which the computer will log out.

property require_password_to_unlock: bool

Is a password required to unlock secure preferences?

property require_password_to_wake: bool

Is a password required to wake the computer from sleep or screen saver?

property secure_virtual_memory: bool

Is secure virtual memory being used?

class PyXA.apps.SystemEvents.XASystemEventsService(properties)[source]

Bases: XAObject

A collection of settings for a network service.

New in version 0.1.0.

Attributes:

active

Is the service active?

current_configuration

The currently selected configuration.

id

The unique identifier for the service.

interface

The interface the service is built on.

kind

The type of service.

name

The name of the service.

Methods:

connect()

Connects the service.

disconnect()

Disconnects the service.

property active: bool

Is the service active?

connect() XASystemEventsConfiguration[source]

Connects the service.

Returns:

The service object

Return type:

XASystemEventsConfiguration

New in version 0.1.0.

property current_configuration: XASystemEventsConfiguration

The currently selected configuration.

disconnect() XASystemEventsConfiguration[source]

Disconnects the service.

Returns:

The service object

Return type:

XASystemEventsConfiguration

New in version 0.1.0.

property id: str

The unique identifier for the service.

property interface: XASystemEventsInterface

The interface the service is built on.

property kind: int

The type of service.

property name: str

The name of the service.

class PyXA.apps.SystemEvents.XASystemEventsServiceList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of services that employs fast enumeration techniques.

All properties of services can be called as methods on the wrapped list, returning a list containing each service’s value for the property.

New in version 0.1.0.

Methods:

active()

by_active(active)

by_current_configuration(current_configuration)

by_id(id)

by_interface(interface)

by_kind(kind)

by_name(name)

current_configuration()

id()

interface()

kind()

name()

active() list[bool][source]
by_active(active: bool) XASystemEventsService | None[source]
by_current_configuration(current_configuration: XASystemEventsConfiguration) XASystemEventsService | None[source]
by_id(id: str) XASystemEventsService | None[source]
by_interface(interface: XASystemEventsInterface) XASystemEventsService | None[source]
by_kind(kind: str) XASystemEventsService | None[source]
by_name(name: str) XASystemEventsService | None[source]
current_configuration() XASystemEventsConfigurationList[source]
id() list[str][source]
interface() XASystemEventsInterfaceList[source]
kind() list[str][source]
name() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsUIElement(properties)[source]

Bases: XAObject, XASelectable

A piece of the user interface of a process.

New in version 0.1.0.

Attributes:

accessibility_description

A more complete description of the UI element and its capabilities.

enabled

Is the UI element enabled? (Does it accept clicks?)

entire_contents

A list of every UI element contained in this UI element and its child UI elements, to the limits of the tree.

focused

Is the focus on this UI element?

help

An elaborate description of the UI element and its capabilities.

maximum_value

The maximum value that the UI element can take on.

minimum_value

The minimum value that the UI element can take on.

name

The name of the UI Element, which identifies it within its container.

object_description

The accessibility description, if available; otherwise, the role description.

orientation

The orientation of the UI element.

position

The position of the UI element.

role

An encoded description of the UI element and its capabilities.

role_description

A more complete description of the UI element's role.

selected

Is the UI element selected?

size

The size of the UI element.

subrole

An encoded description of the UI element and its capabilities.

title

The title of the UI element as it appears on the screen.

value

The current value of the UI element.

Methods:

actions([filter])

Returns a list of action elements, as PyXA-wrapped objects, matching the given filter.

attributes([filter])

Returns a list of attribute elements, as PyXA-wrapped objects, matching the given filter.

browsers([filter])

Returns a list of browser elements, as PyXA-wrapped objects, matching the given filter.

busy_indicators([filter])

Returns a list of busy indicator elements, as PyXA-wrapped objects, matching the given filter.

buttons([filter])

Returns a list of button elements, as PyXA-wrapped objects, matching the given filter.

cancel()

Cancels the UI element, if applicable.

checkboxes([filter])

Returns a list of checkbox elements, as PyXA-wrapped objects, matching the given filter.

click([point])

Cause the target process to behave as if the UI element were clicked.

color_wells([filter])

Returns a list of color well elements, as PyXA-wrapped objects, matching the given filter.

columns([filter])

Returns a list of table column elements, as PyXA-wrapped objects, matching the given filter.

combo_boxes([filter])

Returns a list of combo box elements, as PyXA-wrapped objects, matching the given filter.

confirm()

Confirms the UI element, if applicable.

decrement()

Decrements the UI element, if applicable.

drawers([filter])

Returns a list of drawer elements, as PyXA-wrapped objects, matching the given filter.

groups([filter])

Returns a list of group elements, as PyXA-wrapped objects, matching the given filter.

grow_areas([filter])

Returns a list of grow area elements, as PyXA-wrapped objects, matching the given filter.

images([filter])

Returns a list of image elements, as PyXA-wrapped objects, matching the given filter.

increment()

Increments the UI element, if applicable.

incrementors([filter])

Returns a list of incrementor elements, as PyXA-wrapped objects, matching the given filter.

lists([filter])

Returns a list of list elements, as PyXA-wrapped objects, matching the given filter.

menu_bar_items([filter])

Returns a list of menu bar item elements, as PyXA-wrapped objects, matching the given filter.

menu_bars([filter])

Returns a list of menu bar elements, as PyXA-wrapped objects, matching the given filter.

menu_buttons([filter])

Returns a list of menu button elements, as PyXA-wrapped objects, matching the given filter.

menu_items([filter])

Returns a list of menu item elements, as PyXA-wrapped objects, matching the given filter.

menus([filter])

Returns a list of menu elements, as PyXA-wrapped objects, matching the given filter.

outlines([filter])

Returns a list of outline elements, as PyXA-wrapped objects, matching the given filter.

pick()

Picks the UI element, if applicable.

pop_overs([filter])

Returns a list of pop-over elements, as PyXA-wrapped objects, matching the given filter.

pop_up_buttons([filter])

Returns a list of pop-up button elements, as PyXA-wrapped objects, matching the given filter.

progress_indicators([filter])

Returns a list of progress indicator elements, as PyXA-wrapped objects, matching the given filter.

radio_buttons([filter])

Returns a list of radio button elements, as PyXA-wrapped objects, matching the given filter.

radio_groups([filter])

Returns a list of radio group elements, as PyXA-wrapped objects, matching the given filter.

relevance_indicators([filter])

Returns a list of relevance indicator elements, as PyXA-wrapped objects, matching the given filter.

rows([filter])

Returns a list of table row elements, as PyXA-wrapped objects, matching the given filter.

scroll_areas([filter])

Returns a list of scroll area elements, as PyXA-wrapped objects, matching the given filter.

scroll_bars([filter])

Returns a list of scroll bar elements, as PyXA-wrapped objects, matching the given filter.

sheets([filter])

Returns a list of sheet elements, as PyXA-wrapped objects, matching the given filter.

sliders([filter])

Returns a list of slider elements, as PyXA-wrapped objects, matching the given filter.

splitter_groups([filter])

Returns a list of splitter group elements, as PyXA-wrapped objects, matching the given filter.

splitters([filter])

Returns a list of splitter elements, as PyXA-wrapped objects, matching the given filter.

static_texts([filter])

Returns a list of static text elements, as PyXA-wrapped objects, matching the given filter.

tab_groups([filter])

Returns a list of tab group elements, as PyXA-wrapped objects, matching the given filter.

tables([filter])

Returns a list of table elements, as PyXA-wrapped objects, matching the given filter.

text_areas([filter])

Returns a list of text area elements, as PyXA-wrapped objects, matching the given filter.

text_fields([filter])

Returns a list of text fields elements, as PyXA-wrapped objects, matching the given filter.

toolbars([filter])

Returns a list of toolbar elements, as PyXA-wrapped objects, matching the given filter.

ui_elements([filter])

Returns a list of UI elements, as PyXA-wrapped objects, matching the given filter.

value_indicators([filter])

Returns a list of value indicator elements, as PyXA-wrapped objects, matching the given filter.

windows([filter])

Returns a list of window elements, as PyXA-wrapped objects, matching the given filter.

property accessibility_description: str | None

A more complete description of the UI element and its capabilities.

actions(filter: dict | None = None) XASystemEventsActionList | None[source]

Returns a list of action elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of actions

Return type:

XASystemEventsActionList

New in version 0.1.0.

attributes(filter: dict | None = None) XASystemEventsAttributeList | None[source]

Returns a list of attribute elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of attributes

Return type:

XASystemEventsAttributeList

New in version 0.1.0.

browsers(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of browser elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of browsers

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

busy_indicators(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of busy indicator elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of busy indicators

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

buttons(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of button elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of buttons

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

cancel()[source]

Cancels the UI element, if applicable.

New in version 0.1.0.

checkboxes(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of checkbox elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of checkboxes

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

click(point: tuple[int, int] | None = None)[source]

Cause the target process to behave as if the UI element were clicked.

Parameters:

point (Union[tuple[int, int], None], optional) – The coordinate location at which to click, defaults to None

New in version 0.1.0.

color_wells(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of color well elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of color wells

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

columns(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of table column elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of columns

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

combo_boxes(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of combo box elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of combo boxes

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

confirm()[source]

Confirms the UI element, if applicable.

New in version 0.1.0.

decrement()[source]

Decrements the UI element, if applicable.

New in version 0.1.0.

drawers(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of drawer elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of drawers

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property enabled: bool | None

Is the UI element enabled? (Does it accept clicks?)

property entire_contents: XAList

A list of every UI element contained in this UI element and its child UI elements, to the limits of the tree.

property focused: bool | None

Is the focus on this UI element?

groups(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of group elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of groups

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

grow_areas(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of grow area elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of grow areas

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property help: str | None

An elaborate description of the UI element and its capabilities.

images(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of image elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of images

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

increment()[source]

Increments the UI element, if applicable.

New in version 0.1.0.

incrementors(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of incrementor elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of incrementors

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

lists(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of list elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of lists

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property maximum_value: int | float | None

The maximum value that the UI element can take on.

menu_bar_items(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of menu bar item elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of menu bar items

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

menu_bars(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of menu bar elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of menu bars

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

menu_buttons(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of menu button elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of menu buttons

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

menu_items(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of menu item elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of menu items

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

menus(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of menu elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of menus

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property minimum_value: int | float | None

The minimum value that the UI element can take on.

property name: str

The name of the UI Element, which identifies it within its container.

property object_description: str | None

The accessibility description, if available; otherwise, the role description.

property orientation: str | None

The orientation of the UI element.

outlines(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of outline elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of outlines

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

pick()[source]

Picks the UI element, if applicable.

New in version 0.1.0.

pop_overs(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of pop-over elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of pop-overs

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

pop_up_buttons(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of pop-up button elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of pop-up buttons

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property position: list[int | float] | None

The position of the UI element.

progress_indicators(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of progress indicator elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of progress indicators

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

radio_buttons(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of radio button elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of radio buttons

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

radio_groups(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of radio group elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of radio groups

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

relevance_indicators(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of relevance indicator elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of relevance indicators

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property role: str

An encoded description of the UI element and its capabilities.

property role_description: str

A more complete description of the UI element’s role.

rows(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of table row elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of rows

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

scroll_areas(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of scroll area elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of scroll areas

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

scroll_bars(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of scroll bar elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of scroll bars

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property selected: bool | None

Is the UI element selected?

sheets(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of sheet elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of sheets

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property size: list[int | float] | None

The size of the UI element.

sliders(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of slider elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of sliders

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

splitter_groups(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of splitter group elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of splitter groups

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

splitters(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of splitter elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of splitters

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

static_texts(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of static text elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of static texts

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property subrole: str | None

An encoded description of the UI element and its capabilities.

tab_groups(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of tab group elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of tab groups

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

tables(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of table elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of tables

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

text_areas(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of text area elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of text areas

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

text_fields(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of text fields elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of text fields

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property title: str

The title of the UI element as it appears on the screen.

toolbars(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of toolbar elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of outlines

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

ui_elements(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of UI elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of UI elements

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property value: Any

The current value of the UI element.

value_indicators(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of value indicator elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of value indicators

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

windows(filter: dict | None = None) XASystemEventsWindowList | None[source]

Returns a list of window elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of windows

Return type:

XASystemEventsWindowList

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsUIElementList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XAList

A wrapper around lists of UI elements that employs fast enumeration techniques.

All properties of UI elements can be called as methods on the wrapped list, returning a list containing each element’s value for the property.

New in version 0.1.0.

Methods:

accessibility_description()

actions([filter])

by_accessibility_description(...)

by_enabled(enabled)

by_entire_contents(entire_contents)

by_focused(focused)

by_help(help)

by_maximum_value(maximum_value)

by_minimum_value(minimum_value)

by_name(name)

by_object_description(object_description)

by_orientation(orientation)

by_position(position)

by_role(role)

by_role_description(role_description)

by_selected(selected)

by_size(size)

by_subrole(subrole)

by_title(title)

by_value(value)

enabled()

entire_contents()

focused()

help()

maximum_value()

minimum_value()

name()

object_description()

orientation()

position()

role()

role_description()

selected()

size()

subrole()

title()

value()

windows([filter])

accessibility_description() list[str][source]
actions(filter: dict | None = None) XASystemEventsActionList[source]
by_accessibility_description(accessibility_description: str) XASystemEventsUIElement | None[source]
by_enabled(enabled: bool) XASystemEventsUIElement | None[source]
by_entire_contents(entire_contents: XASystemEventsUIElementList) XASystemEventsUIElement | None[source]
by_focused(focused: bool) XASystemEventsUIElement | None[source]
by_help(help: str) XASystemEventsUIElement | None[source]
by_maximum_value(maximum_value: int | float) XASystemEventsUIElement | None[source]
by_minimum_value(minimum_value: int | float) XASystemEventsUIElement | None[source]
by_name(name: str) XASystemEventsUIElement | None[source]
by_object_description(object_description: str) XASystemEventsUIElement | None[source]
by_orientation(orientation: str) XASystemEventsUIElement | None[source]
by_position(position: tuple[int, int]) XASystemEventsUIElement | None[source]
by_role(role: str) XASystemEventsUIElement | None[source]
by_role_description(role_description: str) XASystemEventsUIElement | None[source]
by_selected(selected: bool) XASystemEventsUIElement | None[source]
by_size(size: tuple[int, int]) XASystemEventsUIElement | None[source]
by_subrole(subrole: str) XASystemEventsUIElement | None[source]
by_title(title: str) XASystemEventsUIElement | None[source]
by_value(value: Any) XASystemEventsUIElement | None[source]
enabled() list[bool][source]
entire_contents() XASystemEventsUIElementList[source]
focused() list[bool][source]
help() list[str][source]
maximum_value() list[int | float][source]
minimum_value() list[int | float][source]
name() list[str][source]
object_description() list[str][source]
orientation() list[str][source]
position() list[tuple[int, int]][source]
role() list[str][source]
role_description() list[str][source]
selected() list[bool][source]
size() list[tuple[int, int]][source]
subrole() list[str][source]
title() list[str][source]
value() list[Any][source]
windows(filter: dict | None = None) XASystemEventsWindowList[source]
class PyXA.apps.SystemEvents.XASystemEventsUser(properties)[source]

Bases: XAObject

A user of the system.

New in version 0.1.0.

Attributes:

full_name

The user's full name.

home_directory

The path to user's home directory.

name

The user's short name.

picture_path

Path to user's picture.

property full_name: str

The user’s full name.

property home_directory: XAPath

The path to user’s home directory.

property name: str

The user’s short name.

property picture_path: XAPath

Path to user’s picture. Can be set for current user only!

class PyXA.apps.SystemEvents.XASystemEventsUserList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of users that employs fast enumeration techniques.

All properties of users can be called as methods on the wrapped list, returning a list containing each user’s value for the property.

New in version 0.1.0.

Methods:

by_full_name(full_name)

by_home_directory(home_directory)

by_name(name)

by_picture_path(picture_path)

full_name()

home_directory()

name()

picture_path()

by_full_name(full_name: str) XASystemEventsUser | None[source]
by_home_directory(home_directory: XAPath | str) XASystemEventsUser | None[source]
by_name(name: str) XASystemEventsUser | None[source]
by_picture_path(picture_path: XAPath | str) XASystemEventsUser | None[source]
full_name() list[str][source]
home_directory() list[XAPath][source]
name() list[str][source]
picture_path() list[XAPath][source]
class PyXA.apps.SystemEvents.XASystemEventsWindow(properties)[source]

Bases: XASBWindow, XASelectable

A window belonging to a process.

New in version 0.1.0.

Attributes:

accessibility_description

A more complete description of the window and its capabilities.

document

The document whose contents are displayed in the window.

enabled

Is the window enabled? (Does it accept clicks?)

entire_contents

A list of every UI element contained in this window and its child UI elements, to the limits of the tree.

focused

Is the focus on this window?

help

An elaborate description of the window and its capabilities.

maximum_value

The maximum value that the UI element can take on.

minimum_value

The minimum value that the UI element can take on.

name

The name of the window, which identifies it within its container.

object_description

The accessibility description, if available; otherwise, the role description.

orientation

The orientation of the window.

position

The position of the window.

role

An encoded description of the window and its capabilities.

role_description

A more complete description of the window's role.

selected

Is the window selected?

size

The size of the window.

subrole

An encoded description of the window and its capabilities.

title

The title of the window as it appears on the screen.

value

The current value of the window.

Methods:

actions([filter])

Returns a list of action elements, as PyXA-wrapped objects, matching the given filter.

attributes([filter])

Returns a list of attribute elements, as PyXA-wrapped objects, matching the given filter.

browsers([filter])

Returns a list of browser elements, as PyXA-wrapped objects, matching the given filter.

busy_indicators([filter])

Returns a list of busy indicator elements, as PyXA-wrapped objects, matching the given filter.

buttons([filter])

Returns a list of button elements, as PyXA-wrapped objects, matching the given filter.

cancel()

Cancels the window, if applicable.

checkboxes([filter])

Returns a list of checkbox elements, as PyXA-wrapped objects, matching the given filter.

click([point])

Cause the window.

close()

Collapses (minimizes) the window.

collapse()

Collapses (minimizes) the window.

color_wells([filter])

Returns a list of color well elements, as PyXA-wrapped objects, matching the given filter.

combo_boxes([filter])

Returns a list of combo box elements, as PyXA-wrapped objects, matching the given filter.

confirm()

Confirms the window, if applicable.

decrement()

Decrements the window, if applicable.

drawers([filter])

Returns a list of drawer elements, as PyXA-wrapped objects, matching the given filter.

groups([filter])

Returns a list of group elements, as PyXA-wrapped objects, matching the given filter.

grow_areas([filter])

Returns a list of grow area elements, as PyXA-wrapped objects, matching the given filter.

images([filter])

Returns a list of image elements, as PyXA-wrapped objects, matching the given filter.

increment()

Increments the window, if applicable.

incrementors([filter])

Returns a list of incrementor elements, as PyXA-wrapped objects, matching the given filter.

lists([filter])

Returns a list of list elements, as PyXA-wrapped objects, matching the given filter.

menu_buttons([filter])

Returns a list of menu button elements, as PyXA-wrapped objects, matching the given filter.

outlines([filter])

Returns a list of outline elements, as PyXA-wrapped objects, matching the given filter.

pick()

Picks the window, if applicable.

pop_overs([filter])

Returns a list of pop-over elements, as PyXA-wrapped objects, matching the given filter.

pop_up_buttons([filter])

Returns a list of pop-up button elements, as PyXA-wrapped objects, matching the given filter.

progress_indicators([filter])

Returns a list of progress indicator elements, as PyXA-wrapped objects, matching the given filter.

radio_buttons([filter])

Returns a list of radio button elements, as PyXA-wrapped objects, matching the given filter.

radio_groups([filter])

Returns a list of radio group elements, as PyXA-wrapped objects, matching the given filter.

relevance_indicators([filter])

Returns a list of relevance indicator elements, as PyXA-wrapped objects, matching the given filter.

scroll_areas([filter])

Returns a list of scroll area elements, as PyXA-wrapped objects, matching the given filter.

scroll_bars([filter])

Returns a list of scroll bar elements, as PyXA-wrapped objects, matching the given filter.

sheets([filter])

Returns a list of sheet elements, as PyXA-wrapped objects, matching the given filter.

sliders([filter])

Returns a list of slider elements, as PyXA-wrapped objects, matching the given filter.

splitter_groups([filter])

Returns a list of splitter group elements, as PyXA-wrapped objects, matching the given filter.

splitters([filter])

Returns a list of splitter elements, as PyXA-wrapped objects, matching the given filter.

static_texts([filter])

Returns a list of static text elements, as PyXA-wrapped objects, matching the given filter.

tab_groups([filter])

Returns a list of tab group elements, as PyXA-wrapped objects, matching the given filter.

tables([filter])

Returns a list of table elements, as PyXA-wrapped objects, matching the given filter.

text_areas([filter])

Returns a list of text area elements, as PyXA-wrapped objects, matching the given filter.

text_fields([filter])

Returns a list of text fields elements, as PyXA-wrapped objects, matching the given filter.

toolbars([filter])

Returns a list of toolbar elements, as PyXA-wrapped objects, matching the given filter.

ui_elements([filter])

Returns a list of UI elements, as PyXA-wrapped objects, matching the given filter.

uncollapse()

Uncollapses (unminimizes/expands) the window.

property accessibility_description: str | None

A more complete description of the window and its capabilities.

actions(filter: dict | None = None) XASystemEventsActionList | None[source]

Returns a list of action elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of actions

Return type:

XASystemEventsActionList

New in version 0.1.0.

attributes(filter: dict | None = None) XASystemEventsAttributeList | None[source]

Returns a list of attribute elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of attributes

Return type:

XASystemEventsAttributeList

New in version 0.1.0.

browsers(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of browser elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of browsers

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

busy_indicators(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of busy indicator elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of busy indicators

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

buttons(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of button elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of buttons

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

cancel()[source]

Cancels the window, if applicable.

New in version 0.1.0.

checkboxes(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of checkbox elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of checkboxes

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

click(point: tuple[int, int] | None = None)[source]

Cause the window.

Parameters:

point (Union[tuple[int, int], None], optional) – The coordinate location at which to click, defaults to None

New in version 0.1.0.

close() XASystemEventsWindow[source]

Collapses (minimizes) the window.

Returns:

A reference to the now-collapsed window object.

Return type:

XASystemEventsWindow

Example:

>>> import PyXA
>>> PyXA.Application("App Store").front_window.close()

New in version 0.0.1.

collapse() XASystemEventsWindow[source]

Collapses (minimizes) the window.

Returns:

A reference to the now-collapsed window object.

Return type:

XASystemEventsWindow

Example:

>>> import PyXA
>>> PyXA.Application("App Store").front_window.collapse()

New in version 0.0.1.

color_wells(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of color well elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of color wells

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

combo_boxes(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of combo box elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of combo boxes

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

confirm()[source]

Confirms the window, if applicable.

New in version 0.1.0.

decrement()[source]

Decrements the window, if applicable.

New in version 0.1.0.

property document: XASystemEventsDocument

The document whose contents are displayed in the window.

drawers(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of drawer elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of drawers

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property enabled: bool | None

Is the window enabled? (Does it accept clicks?)

property entire_contents: list[XAObject]

A list of every UI element contained in this window and its child UI elements, to the limits of the tree.

property focused: bool | None

Is the focus on this window?

groups(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of group elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of groups

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

grow_areas(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of grow area elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of grow areas

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property help: str | None

An elaborate description of the window and its capabilities.

images(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of image elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of images

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

increment()[source]

Increments the window, if applicable.

New in version 0.1.0.

incrementors(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of incrementor elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of incrementors

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

lists(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of list elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of lists

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property maximum_value: int | float | None

The maximum value that the UI element can take on.

menu_buttons(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of menu button elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of menu buttons

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property minimum_value: int | float | None

The minimum value that the UI element can take on.

property name: str

The name of the window, which identifies it within its container.

property object_description: str | None

The accessibility description, if available; otherwise, the role description.

property orientation: str | None

The orientation of the window.

outlines(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of outline elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of outlines

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

pick()[source]

Picks the window, if applicable.

New in version 0.1.0.

pop_overs(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of pop-over elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of pop-overs

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

pop_up_buttons(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of pop-up button elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of pop-up buttons

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property position: list[int | float] | None

The position of the window.

progress_indicators(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of progress indicator elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of progress indicators

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

radio_buttons(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of radio button elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of radio buttons

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

radio_groups(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of radio group elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of radio groups

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

relevance_indicators(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of relevance indicator elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of relevance indicators

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property role: str

An encoded description of the window and its capabilities.

property role_description: str

A more complete description of the window’s role.

scroll_areas(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of scroll area elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of scroll areas

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

scroll_bars(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of scroll bar elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of scroll bars

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property selected: bool | None

Is the window selected?

sheets(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of sheet elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of sheets

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property size: list[int | float] | None

The size of the window.

sliders(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of slider elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of sliders

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

splitter_groups(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of splitter group elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of splitter groups

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

splitters(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of splitter elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of splitters

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

static_texts(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of static text elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of static texts

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property subrole: str | None

An encoded description of the window and its capabilities.

tab_groups(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of tab group elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of tab groups

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

tables(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of table elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of tables

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

text_areas(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of text area elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of text areas

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

text_fields(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of text fields elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of text fields

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

property title: str | None

The title of the window as it appears on the screen.

toolbars(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of toolbar elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of outlines

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

ui_elements(filter: dict | None = None) XASystemEventsUIElementList | None[source]

Returns a list of UI elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned elements will have, or None

Returns:

The list of UI elements

Return type:

XASystemEventsUIElementList

New in version 0.1.0.

uncollapse() XASystemEventsWindow[source]

Uncollapses (unminimizes/expands) the window.

Returns:

A reference to the uncollapsed window object.

Return type:

XASystemEventsWindow

Example:

>>> import PyXA
>>> PyXA.Application("App Store").front_window.uncollapse()

New in version 0.0.1.

property value: Any

The current value of the window.

class PyXA.apps.SystemEvents.XASystemEventsWindowList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XASBWindowList

A wrapper around a list of windows.

New in version 0.1.2.

Methods:

close()

Closes all windows in the list.add()

collapse()

Collapses all windows in the list.

name()

uncollapse()

Uncollapses all windows in the list.

close()[source]

Closes all windows in the list.add()

Example:

>>> import PyXA
>>> app = PyXA.Application("Keychain Access")
>>> app.windows().close()

New in version 0.0.6.

collapse() XASystemEventsWindowList[source]

Collapses all windows in the list.

Example:

>>> import PyXA
>>> app = PyXA.Application("Keychain Access")
>>> app.windows().collapse()

New in version 0.0.5.

name() list[str][source]
uncollapse() XASystemEventsWindowList[source]

Uncollapses all windows in the list.

Example:

>>> import PyXA
>>> app = PyXA.Application("Keychain Access")
>>> app.windows().uncollapse()

New in version 0.0.6.

class PyXA.apps.SystemEvents.XASystemEventsXMLAttribute(properties)[source]

Bases: XAObject

A named value associated with a unit of data in XML format.

New in version 0.1.0.

Attributes:

name

The name of the XML attribute.

value

The value of the XML attribute.

property name: str

The name of the XML attribute.

property value: Any

The value of the XML attribute.

class PyXA.apps.SystemEvents.XASystemEventsXMLAttributeList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of XML attributes that employs fast enumeration techniques.

All properties of XML attributes can be called as methods on the wrapped list, returning a list containing each attribute’s value for the property.

New in version 0.1.0.

Methods:

by_name(name)

by_value(value)

name()

value()

by_name(name: str) XASystemEventsXMLAttribute | None[source]
by_value(value: Any) XASystemEventsXMLAttribute | None[source]
name() list[str][source]
value() list[Any][source]
class PyXA.apps.SystemEvents.XASystemEventsXMLData(properties)[source]

Bases: XAObject

Data in XML format.

New in version 0.1.0.

Attributes:

id

The unique identifier of the XML data.

name

The name of the XML data.

text

The text representation of the XML data.

Methods:

xml_elements([filter])

Returns a list of XML elements, as PyXA-wrapped objects, matching the given filter.

property id: str

The unique identifier of the XML data.

property name: str

The name of the XML data.

property text: str

The text representation of the XML data.

xml_elements(filter: dict | None = None) XASystemEventsXMLElementList | None[source]

Returns a list of XML elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned XML elements will have, or None

Returns:

The list of XML elements

Return type:

XASystemEventsXMLElementList

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsXMLDataList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of XML data that employs fast enumeration techniques.

All properties of XML datas can be called as methods on the wrapped list, returning a list containing each XML data’s value for the property.

New in version 0.1.0.

Methods:

by_id(id)

by_name(name)

by_text(text)

id()

name()

text()

by_id(id: str) XASystemEventsXMLData | None[source]
by_name(name: str) XASystemEventsXMLData | None[source]
by_text(text: str) XASystemEventsXMLData | None[source]
id() list[str][source]
name() list[str][source]
text() list[str][source]
class PyXA.apps.SystemEvents.XASystemEventsXMLElement(properties)[source]

Bases: XAObject

A unit of data in XML format.

New in version 0.1.0.

Attributes:

id

The unique identifier of the XML element.

name

The name of the XML element.

value

The value of the XML element.

Methods:

xml_attributes([filter])

Returns a list of XML attributes, as PyXA-wrapped objects, matching the given filter.

xml_elements([filter])

Returns a list of XML elements, as PyXA-wrapped objects, matching the given filter.

property id: str

The unique identifier of the XML element.

property name: str

The name of the XML element.

property value: Any

The value of the XML element.

xml_attributes(filter: dict | None = None) XASystemEventsXMLAttributeList | None[source]

Returns a list of XML attributes, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned XML attributes will have, or None

Returns:

The list of XML attributes

Return type:

XASystemEventsXMLAttributeList

New in version 0.1.0.

xml_elements(filter: dict | None = None) XASystemEventsXMLElementList | None[source]

Returns a list of XML elements, as PyXA-wrapped objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned XML elements will have, or None

Returns:

The list of XML elements

Return type:

XASystemEventsXMLElementList

New in version 0.1.0.

class PyXA.apps.SystemEvents.XASystemEventsXMLElementList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of XML elements that employs fast enumeration techniques.

All properties of XML elements can be called as methods on the wrapped list, returning a list containing each elements’s value for the property.

New in version 0.1.0.

Methods:

by_id(id)

by_name(name)

by_value(value)

id()

name()

value()

by_id(id: str) XASystemEventsXMLElement | None[source]
by_name(name: str) XASystemEventsXMLElement | None[source]
by_value(value: Any) XASystemEventsXMLElement | None[source]
id() list[str][source]
name() list[str][source]
value() list[Any][source]
class PyXA.apps.SystemEvents.XASystemEventsXMLFile(properties)[source]

Bases: XAObject

A file containing data in XML format.

New in version 0.1.0.

Attributes:

contents

The contents of the XML file; elements and properties of the XML data may be accessed as if they were elements and properties of the XML file.

property contents: XASystemEventsXMLData

The contents of the XML file; elements and properties of the XML data may be accessed as if they were elements and properties of the XML file.

class PyXA.apps.SystemEvents.XASystemEventsXMLFileList(properties: dict, filter: dict | None = None)[source]

Bases: XAFileList

A wrapper around lists of XML files that employs fast enumeration techniques.

All properties of XML files can be called as methods on the wrapped list, returning a list containing each file’s value for the property.

New in version 0.1.0.

Methods:

by_contents(contents)

contents()

by_contents(contents: XASystemEventsXMLData) XASystemEventsXMLFile | None[source]
contents() XASystemEventsXMLDataList[source]