#
cp.app
This class assists with working with macOS apps. It provides functions for finding, checking the running status, version number, path, and many other values related to an application. It also provides support for launching, quitting, and other activities related to applications.
This extension differs from the hs.application
extension in several ways:
cp.app
instances are long-lived. You request it once and it will stay up-to-date even if the app quits.- It makes extensive use of
cp.prop
, so you canwatch
many most properties of the app and get live notifications when they change.
#
Submodules
#
API Overview
Variables - Configurable values
frontmostApp
Functions - API calls offered directly by the extension
apps bundleIDs is
Constructors - API calls which return an object, typically one that offers API methods
forBundleID
Fields - Variables which can only be accessed from an object returned by a constructor
baseLocale baseResourcesPath currentLocale description displayName focusedWindow focusedWindowUI frontmost hsApplication info installed isWindowAnimationEnabled localeResourcesPath mainWindowUI modalDialogOpen path pid preferences resourcesPath running showing supportedLocales UI version versionString windows windowsUI
Methods - API calls which can only be made on an object returned by a constructor
bestSupportedLocale bundleID doHide doLaunch doQuit doRestart doShow hide icon isSupportedLocale keyStroke launch notifier quit registerWindowType searchResources show update