axuielement
and then register for the type of notification to watch, along with a function that will get triggered.cp.ui.notifier.notifiersForBundleID(bundleID) -> table of cp.ui.notifier
cp.ui.notifier
instances that have been created for the specified Bundle ID
.cp.ui.notifier
instances.cp.ui.notifier.new(bundleID, elementFinderFn) -> cp.ui.notifier
cp.ui.notifier
instance with the specified bundle ID andaxuielement
to observe.cp.ui.notifier
instance.cp.ui.notifier:app() -> hs.application
hs.application
instance for the app this notifier tracks.hs.application
for the notifier's bundleID
, or nil
.cp.ui.notifier:bundleID()
cp.ui.notifier:currentElement() -> hs._asm.axuielement
axuielement
being observed.axuielement
, or nil
if not available.cp.ui.notifier:debugging([enabled]) -> boolean
true
, debugging notifications will be emitted. If false
, it will be disabled. If not provided, no change is made.true
if currently debugging, false
otherwise.cp.ui.notifier:pid() -> number
nil
if it's not running.nil
.cp.ui.notifier:reset() -> self
cp.ui.notifier:start() -> self
cp.ui.notifier
instance.cp.ui.notifier:update([force]) -> self
axuielement
.true
, the notifier will be updated even if the element has not changed since the last update. Defaults to false
.cp.ui.notifier
instance.cp.ui.notifier:watchAll(callbackFn) -> self
axuielement
.cp.ui.notifier
instance.watchFor
[#watchFor] in most cases.hs._asm.axuielement
object for the accessibility element which generated the notification.cp.ui.notifier:watchFor(notification, callbackFn) -> self
string
or table of strings
with the notification type(s) to watch for (e.g. "AXValueChanged").cp.ui.notifier
instance.hs._asm.axuielement
object for the accessibility element which generated the notification.