Watch for events on certain UI elements (including windows and applications)
You can watch the following events:
See hs.application.watcher for more events you can watch.
These events are watched on the application level, but send the relevant child element to the handler.
These work on all UI elements, including windows.
Signature | hs.uielement.watcher:element() -> object |
---|---|
Type | Method |
Description |
Returns the element the watcher is watching. |
Parameters |
|
Returns |
|
Source | extensions/uielement/libuielement_watcher.m line 57 |
Signature | hs.uielement.watcher:pid() -> number |
---|---|
Type | Method |
Description |
Returns the PID of the element being watched |
Parameters |
|
Returns |
|
Source | extensions/uielement/libuielement_watcher.m line 40 |
Signature | hs.uielement.watcher:start(events) -> hs.uielement.watcher |
---|---|
Type | Method |
Description |
Tells the watcher to start watching for the given list of events. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/uielement/uielement.lua line 114 |
Signature | hs.uielement.watcher:stop() -> hs.uielement.watcher |
---|---|
Type | Method |
Description |
Tells the watcher to stop listening for events. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/uielement/uielement.lua line 148 |
© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.uielement.watcher.html