Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftUI Control Center window children only exposed as .AXChildren, not .children #434

Closed
nriley opened this issue Nov 25, 2021 · 1 comment

Comments

@nriley
Copy link

nriley commented Nov 25, 2021

On macOS Monterey, after dragging the 'Display' section of Control Center out into its own menu extra:

from talon import Module, actions, ui
from pprint import pprint as pp

mod = Module()

@mod.action_class
class Actions:
	def test():
		"""test"""
		s = ui.apps(bundle='com.apple.controlcenter')[0]
		dm = s.children.find_one(AXRole='AXMenuBarItem', AXIdentifier='com.apple.menuextra.display')
		dm.perform('AXPress')
		actions.sleep(0.1)
		pp(s.children[0].children)
		pp(s.children[0].AXChildren)
		dm.perform('AXPress')
>>> actions.user.test()
[]
[<AXScrollArea>, <AXButton 'Display Preferences…'>]
@nriley
Copy link
Author

nriley commented Nov 25, 2021

Fixed in the latest beta. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant