Skip to content

Instantly share code, notes, and snippets.

@ChristoferK
Last active June 7, 2019 07:49
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 ChristoferK/057a189c6ee1b9cce4de8e63af58c837 to your computer and use it in GitHub Desktop.
Save ChristoferK/057a189c6ee1b9cce4de8e63af58c837 to your computer and use it in GitHub Desktop.
[Menubar Applications] UI scripting commands in AppleScript that provide access to the menubar applications and their menubar icons #AppleScript #applications #menubar #SystemEvents #UI
use application "System Events"
set _P to a reference to (processes whose class of menu bar 2 = menu bar)
name of _P --> A list of apps sitting in the menu bar
menu bar item 1 of menu bar 2 of _P --> Their icons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment