I need to call a Share menu item from Apple Script. For example I'd like to share a website to the Notes app.
But I cannot find out which process to activate. I'm able to display the Share menu, but cannot select a menu item.
This is just to clarify what I want:
tell application "System Events" to tell process "Safari"
activate
-- Menü "Ablage" öffnen
click menu item "Share …" of menu "Files" of menu bar 1
delay 0.5
click menu item "Notes" of menu item "Share …" of menu "Files" of menu bar 1
end tell