daily pastebin goal

Open the 'About' menu

applehelpwriter Mar 30th, 2018 (edited) 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- open the 'About' menu for the currently active app
  2. -- make it into a Service or use a script runner like FastScripts to assign it a hotkey
  3. -- http://applehelpwriter.com/2018/03/31/how-to-add-a-hotkey-for-the-about-menu/
  6. tell application "System Events" to tell (process 1 where it is frontmost)
  7. try
  8. tell menu bar item 2 of menu bar 1
  9. click
  10. tell menu item 1 of menu 1 to click
  11. end tell
  12. on error
  13. display dialog "Couldn't get 'About' menu item." buttons "OK" default button "OK" with icon 2 with title "About Menu Script"
  14. end try
  15. end tell
RAW Paste Data