Skip to content

Instantly share code, notes, and snippets.

@raulfunkie
Created December 19, 2022 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raulfunkie/791c0545c92c0a804675500604503e92 to your computer and use it in GitHub Desktop.
Save raulfunkie/791c0545c92c0a804675500604503e92 to your computer and use it in GitHub Desktop.
tell application "System Events"
tell application process "Control Center"
click (first menu bar item of menu bar 1 ¬
whose value of attribute "AXIdentifier" is "com.apple.menuextra.user")
click (first button of window "Control Center" whose name is "Username")
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment