I’d like to workaround a limitation with Outlook which is of it not allowing me to set a delay all emails sent by x minutes. A way I thought about working around this is to use Alfred Worklfows Hotkey trigger to be run when I decide to send a message. This trigger actions an Applescript to navigate to the menu bar of the new message window go to Draft and click Send Later…
The blocker I stumbled on is that the menu bar doesn’t sees the “Draft” menu bar item because it is not available on the main outlook window, but only for the new message window.
Because of this when I try:
tell application “System Events”
tell process “Outlook”
tell menu bar 1
tell menu bar item “Draft”
click menu item “Send Later…”
end tell
end tell
end tell
end tell
I get
“execution error: System Events got an error: Can’t get menu item “Send Later…” of menu bar item “Draft” of menu bar 1 of process “Outlook”.”
So, the question is, how do I get to the right menu bar which is not the main window? I’ve tried the obvious thing which is to tell menu bar 2, but none of that worked. I’ve also tried exploring the app via Accessibility Investigator, but there I also couldn’t find the menu bar.
Any ideas?
Many thanks for your help.