HSApplication
TypeObject representing an application. You should not instantiate this directly in JavaScript, but rather, use the methods from hs.application which will return appropriate HSApplication objects.
Properties
Methods
kill() -> boolean
Terminate the application
Declaration
kill() -> boolean
Returns
boolean
True if the application was terminated, otherwise false
Example
const app = hs.application.matchingName("Calculator")
app.kill()
kill9() -> boolean
Force-terminate the application
Declaration
kill9() -> boolean
Returns
boolean
True if the application was force-terminated, otherwise false
Example
const app = hs.application.matchingName("Calculator")
app.kill9()
axElement() -> HSAXElement
The application's HSAXElement object, for use with the hs.ax APIs
Declaration
axElement() -> HSAXElement
Returns
HSAXElement
An HSAXElement object, or nil if it could not be obtained
Example
const app = hs.application.frontmost()
const ax = app.axElement()