I find Apple Mail smart mailboxes very useful but tedious to configure the mailboxes in large numbers which I need to do as emails from new sources are coming in.
Basically in my smart mailboxes, I define a from: ddd@test.com and located in all inboxes.
attached macro.
if I copy the email address of interest, the macro will automatically fill in both the title and the email address following "from".
My problem is that I want to continue by clicking on the (+) button, after which it is easy (tab → insert text by typing message is in mailbox → all inboxes will automatically populate → press OK button).
The KBM actions I tried and did not work:
To make things even simpler, do you think that you could add 1-2 lines to the apple script to
actually enter the details of the criterion, meaning selecting "Message is in mailbox" from the dropdown list ? If you do so, "All Inboxes" will automatically populate the mailbox field, and my macro will basically be complete except for pressing the OK button.
after that if possible press the OK button (I can also press the OK button with KBM)
Sure, here's how to select the item from the dropdown and click OK. I don't see the option "All Inboxes" that you were referring to, so you'll need to adjust the script below. I'd recommend you get the UI Browser app to help you inspect the actual UI that you need to interact with AppleScript.
tell application "System Events" to tell process "Mail"
click pop up button 1 of scroll area 1 of sheet 1 of window "Rules"
delay 0.1
click menu item "Message is junk mail" of menu 1 of pop up button 1 of scroll area 1 of sheet 1 of window "Rules"
click button "OK" of sheet 1 of window "Rules"
end tell
thanks very much. I thought that UI browser discontinued the app ?
You're welcome. The ownership was passed on to the people at latenightsoftware. The original owner is already ~80 and said he wanted to retire after 20 years of maintaining it. I find it really inspiring he kept going for so long.