Arc Module Reference

Classes:

XAArcApplication(properties)

The application's top-level scripting object.

XAArcSpace(properties)

A space.

XAArcSpaceList(properties[, filter])

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

XAArcTab(properties)

A window's tab.

XAArcTabList(properties[, filter])

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

XAArcWindow(properties)

An application's window.

XAArcWindowList(properties[, filter])

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

class PyXA.apps.Arc.XAArcApplication(properties)[source]

Bases: XASBApplication, XACanOpenPath

The application’s top-level scripting object.

New in version 0.3.0.

Classes:

ObjectType(value)

The object types available for creation in Arc.

TabLocation(value)

Tab locations for Arc tabs.

WindowMode(value)

Window modes for Arc windows.

Attributes:

frontmost

Is this the frontmost (active) application?

name

The name of the application.

version

The version of the application.

Methods:

make(specifier[, properties, data])

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

windows([filter])

Returns a list of windows, as PyXA objects, matching the given filter.

class ObjectType(value)[source]

Bases: Enum

The object types available for creation in Arc.

New in version 0.3.0.

Attributes:

SPACE

TAB

WINDOW

SPACE = 'space'
TAB = 'tab'
WINDOW = 'window'
class TabLocation(value)[source]

Bases: Enum

Tab locations for Arc tabs.

New in version 0.3.0.

Attributes:

PINNED

TOPAPP

UNPINNED

PINNED = 'pinned'
TOPAPP = 'topApp'
UNPINNED = 'unpinned'
class WindowMode(value)[source]

Bases: Enum

Window modes for Arc windows.

New in version 0.3.0.

Attributes:

INCOGNITO

NORMAL

INCOGNITO = 'incognito'
NORMAL = 'normal'
property frontmost: bool

Is this the frontmost (active) application?

New in version 0.3.0.

make(specifier: str | ObjectType, properties: dict | None = None, data: Any | None = None) XAObject[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, XAArcApplication.ObjectType]) – The classname of the object to create

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

  • data (Any) – The data to give the object

Returns:

A PyXA wrapped form of the object

Return type:

XABase.XAObject

New in version 0.3.0.

property name: str

The name of the application.

New in version 0.3.0.

property version: str

The version of the application.

New in version 0.3.0.

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

Returns a list of windows, as PyXA objects, matching the given filter.

New in version 0.3.0.

class PyXA.apps.Arc.XAArcSpace(properties)[source]

Bases: XAObject

A space.

New in version 0.3.0.

Methods:

focus()

Focus the space.

tabs([filter])

Returns a list of tabs, as PyXA objects, matching the given filter.

Attributes:

id

The unique identifier of the space.

title

The full title of the space.

focus()[source]

Focus the space.

New in version 0.3.0.

property id: str

The unique identifier of the space.

New in version 0.3.0.

tabs(filter: dict | None = None) XAArcTab[source]

Returns a list of tabs, as PyXA objects, matching the given filter.

New in version 0.3.0.

property title: str

The full title of the space.

New in version 0.3.0.

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

Bases: XAList

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

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

New in version 0.3.0.

Methods:

by_id(id)

Retrieves the A spacewhose id matches the given id.

by_title(title)

Retrieves the A spacewhose title matches the given title.

id()

The unique identifier of the space.

title()

The full title of the space.

by_id(id: str) XAArcSpace[source]

Retrieves the A spacewhose id matches the given id.

New in version 0.3.0.

by_title(title: str) XAArcSpace[source]

Retrieves the A spacewhose title matches the given title.

New in version 0.3.0.

id() list[str][source]

The unique identifier of the space.

New in version 0.3.0.

title() list[str][source]

The full title of the space.

New in version 0.3.0.

class PyXA.apps.Arc.XAArcTab(properties)[source]

Bases: XAObject

A window’s tab.

New in version 0.3.0.

Methods:

close()

Close the tab.

execute_javascript(script)

Execute JavaScript in the context of the tab.

go_back()

Go Back (If Possible).

go_forward()

Go Forward (If Possible).

reload()

Reload the tab.

select()

Select the tab.

stop()

Stop loading the tab.

Attributes:

id

The unique identifier of the tab.

loading

Is loading?

location

Represents the location of the tab in the sidebar.

title

The full title of the tab.

url

The url of the tab.

close()[source]

Close the tab.

New in version 0.3.0.

execute_javascript(script: str) Any[source]

Execute JavaScript in the context of the tab.

New in version 0.3.0.

go_back()[source]

Go Back (If Possible).

New in version 0.3.0.

go_forward()[source]

Go Forward (If Possible).

New in version 0.3.0.

property id: str

The unique identifier of the tab.

New in version 0.3.0.

property loading: bool

Is loading?

New in version 0.3.0.

property location: TabLocation

Represents the location of the tab in the sidebar. Can be ‘topApp’, ‘pinned’, or ‘unpinned’.

New in version 0.3.0.

reload()[source]

Reload the tab.

New in version 0.3.0.

select()[source]

Select the tab.

New in version 0.3.0.

stop()[source]

Stop loading the tab.

New in version 0.3.0.

property title: str

The full title of the tab.

New in version 0.3.0.

property url: str

The url of the tab.

New in version 0.3.0.

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

Bases: XAList

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

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

New in version 0.3.0.

Methods:

by_id(id)

Retrieves the A window's tabwhose id matches the given id.

by_loading(loading)

Retrieves the A window's tabwhose loading matches the given loading.

by_location(location)

Retrieves the A window's tabwhose location matches the given location.

by_title(title)

Retrieves the A window's tabwhose title matches the given title.

by_url(url)

Retrieves the A window's tabwhose url matches the given url.

id()

The unique identifier of the tab.

loading()

Is loading?

location()

Represents the location of the tab in the sidebar.

title()

The full title of the tab.

url()

The url of the tab.

by_id(id: str) XAArcTab[source]

Retrieves the A window’s tabwhose id matches the given id.

New in version 0.3.0.

by_loading(loading: bool) XAArcTab[source]

Retrieves the A window’s tabwhose loading matches the given loading.

New in version 0.3.0.

by_location(location: TabLocation) XAArcTab[source]

Retrieves the A window’s tabwhose location matches the given location.

New in version 0.3.0.

by_title(title: str) XAArcTab[source]

Retrieves the A window’s tabwhose title matches the given title.

New in version 0.3.0.

by_url(url: str | XAURL) XAArcTab[source]

Retrieves the A window’s tabwhose url matches the given url.

New in version 0.3.0.

id() list[str][source]

The unique identifier of the tab.

New in version 0.3.0.

loading() list[bool][source]

Is loading?

New in version 0.3.0.

location() list[XAArcApplication.TabLocation][source]

Represents the location of the tab in the sidebar. Can be ‘topApp’, ‘pinned’, or ‘unpinned’.

New in version 0.3.0.

title() list[str][source]

The full title of the tab.

New in version 0.3.0.

url() list[XABase.XAURLList][source]

The url of the tab.

New in version 0.3.0.

class PyXA.apps.Arc.XAArcWindow(properties)[source]

Bases: XASBWindow

An application’s window.

New in version 0.3.0.

Attributes:

active_space

Returns the currently active space

active_tab

Returns the currently selected tab

closeable

Whether the window has a close box.

id

The unique identifier of the window.

incognito

Whether the window is an incognito window.

index

The index of the window, ordered front to back.

minimizable

Whether the window can be minimized.

minimized

Whether the window is currently minimized.

mode

Represents the mode of the window which can be 'normal' or 'incognito', can be set only once during creation of the window.

name

The full title of the window.

resizable

Whether the window can be resized.

visible

Whether the window is currently visible.

zoomable

Whether the window can be zoomed.

zoomed

Whether the window is currently zoomed.

Methods:

close()

Close the window.

spaces([filter])

Returns a list of spaces, as PyXA objects, matching the given filter.

tabs([filter])

Returns a list of tabs, as PyXA objects, matching the given filter.

property active_space: XAArcSpace

Returns the currently active space

New in version 0.3.0.

property active_tab: XAArcTab

Returns the currently selected tab

New in version 0.3.0.

close()[source]

Close the window.

New in version 0.3.0.

property closeable: bool

Whether the window has a close box.

New in version 0.3.0.

property id: str

The unique identifier of the window.

New in version 0.3.0.

property incognito: bool

Whether the window is an incognito window.

New in version 0.3.0.

property index: int

The index of the window, ordered front to back.

New in version 0.3.0.

property minimizable: bool

Whether the window can be minimized.

New in version 0.3.0.

property minimized: bool

Whether the window is currently minimized.

New in version 0.3.0.

property mode: str

Represents the mode of the window which can be ‘normal’ or ‘incognito’, can be set only once during creation of the window.

New in version 0.3.0.

property name: str

The full title of the window.

New in version 0.3.0.

property resizable: bool

Whether the window can be resized.

New in version 0.3.0.

spaces(filter: dict | None = None) XAArcSpace[source]

Returns a list of spaces, as PyXA objects, matching the given filter.

New in version 0.3.0.

tabs(filter: dict | None = None) XAArcTab[source]

Returns a list of tabs, as PyXA objects, matching the given filter.

New in version 0.3.0.

property visible: bool

Whether the window is currently visible.

New in version 0.3.0.

property zoomable: bool

Whether the window can be zoomed.

New in version 0.3.0.

property zoomed: bool

Whether the window is currently zoomed.

New in version 0.3.0.

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

Bases: XASBWindowList

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

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

New in version 0.3.0.

Methods:

active_space()

Returns the currently active space

active_tab()

Returns the currently selected tab

by_active_space(active_space)

Retrieves the An application's window whose active_space matches the given active_space.

by_active_tab(active_tab)

Retrieves the An application's window whose active_tab matches the given active_tab.

by_closeable(closeable)

Retrieves the An application's window whose closeable matches the given closeable.

by_id(id)

Retrieves the An application's window whose id matches the given id.

by_incognito(incognito)

Retrieves the An application's window whose incognito matches the given incognito.

by_index(index)

Retrieves the An application's window whose index matches the given index.

by_minimizable(minimizable)

Retrieves the An application's window whose minimizable matches the given minimizable.

by_minimized(minimized)

Retrieves the An application's window whose minimized matches the given minimized.

by_mode(mode)

Retrieves the An application's window whose mode matches the given mode.

by_name(name)

Retrieves the An application's window whose name matches the given name.

by_resizable(resizable)

Retrieves the An application's window whose resizable matches the given resizable.

by_visible(visible)

Retrieves the An application's window whose visible matches the given visible.

by_zoomable(zoomable)

Retrieves the An application's window whose zoomable matches the given zoomable.

by_zoomed(zoomed)

Retrieves the An application's window whose zoomed matches the given zoomed.

closeable()

Whether the window has a close box.

id()

The unique identifier of the window.

incognito()

Whether the window is an incognito window.

index()

The index of the window, ordered front to back.

minimizable()

Whether the window can be minimized.

minimized()

Whether the window is currently minimized.

mode()

Represents the mode of the window which can be 'normal' or 'incognito', can be set only once during creation of the window.

name()

The full title of the window.

resizable()

Whether the window can be resized.

visible()

Whether the window is currently visible.

zoomable()

Whether the window can be zoomed.

zoomed()

Whether the window is currently zoomed.

active_space() list[XAArcSpace][source]

Returns the currently active space

New in version 0.3.0.

active_tab() list[XAArcTab][source]

Returns the currently selected tab

New in version 0.3.0.

by_active_space(active_space: XAArcSpace) XAArcWindow[source]

Retrieves the An application’s window whose active_space matches the given active_space.

New in version 0.3.0.

by_active_tab(active_tab: XAArcTab) XAArcWindow[source]

Retrieves the An application’s window whose active_tab matches the given active_tab.

New in version 0.3.0.

by_closeable(closeable: bool) XAArcWindow[source]

Retrieves the An application’s window whose closeable matches the given closeable.

New in version 0.3.0.

by_id(id: str) XAArcWindow[source]

Retrieves the An application’s window whose id matches the given id.

New in version 0.3.0.

by_incognito(incognito: bool) XAArcWindow[source]

Retrieves the An application’s window whose incognito matches the given incognito.

New in version 0.3.0.

by_index(index: int) XAArcWindow[source]

Retrieves the An application’s window whose index matches the given index.

New in version 0.3.0.

by_minimizable(minimizable: bool) XAArcWindow[source]

Retrieves the An application’s window whose minimizable matches the given minimizable.

New in version 0.3.0.

by_minimized(minimized: bool) XAArcWindow[source]

Retrieves the An application’s window whose minimized matches the given minimized.

New in version 0.3.0.

by_mode(mode: WindowMode) XAArcWindow[source]

Retrieves the An application’s window whose mode matches the given mode.

New in version 0.3.0.

by_name(name: str) XAArcWindow[source]

Retrieves the An application’s window whose name matches the given name.

New in version 0.3.0.

by_resizable(resizable: bool) XAArcWindow[source]

Retrieves the An application’s window whose resizable matches the given resizable.

New in version 0.3.0.

by_visible(visible: bool) XAArcWindow[source]

Retrieves the An application’s window whose visible matches the given visible.

New in version 0.3.0.

by_zoomable(zoomable: bool) XAArcWindow[source]

Retrieves the An application’s window whose zoomable matches the given zoomable.

New in version 0.3.0.

by_zoomed(zoomed: bool) XAArcWindow[source]

Retrieves the An application’s window whose zoomed matches the given zoomed.

New in version 0.3.0.

closeable() list[bool][source]

Whether the window has a close box.

New in version 0.3.0.

id() list[str][source]

The unique identifier of the window.

New in version 0.3.0.

incognito() list[bool][source]

Whether the window is an incognito window.

New in version 0.3.0.

index() list[int][source]

The index of the window, ordered front to back.

New in version 0.3.0.

minimizable() list[bool][source]

Whether the window can be minimized.

New in version 0.3.0.

minimized() list[bool][source]

Whether the window is currently minimized.

New in version 0.3.0.

mode() list[XAArcApplication.WindowMode][source]

Represents the mode of the window which can be ‘normal’ or ‘incognito’, can be set only once during creation of the window.

New in version 0.3.0.

name() list[str][source]

The full title of the window.

New in version 0.3.0.

resizable() list[bool][source]

Whether the window can be resized.

New in version 0.3.0.

visible() list[bool][source]

Whether the window is currently visible.

New in version 0.3.0.

zoomable() list[bool][source]

Whether the window can be zoomed.

New in version 0.3.0.

zoomed() list[bool][source]

Whether the window is currently zoomed.

New in version 0.3.0.