So, my idea is that when I get a mail from email@example.com, the button that activates the link to this nice forum here shows an alternate icon (easy to do with apple script widgets).
What's harder is the how to do so?
I thought using an Apple Script like
tell application "Mail" tell (messages of mailbox "INBOX" of account "Google" whose read status is false and date received is (current date)) set unread_messages to it repeat with each_message in unread_messages set the_sender to sender of each_message if the_sender contains "folivora" then return "New on BTT" set read status to true else return "Nothing happens on BTT" end if end repeat return unread_messages end tell end tell end tell
I didn't want this to run every so and then, so I thought using rules in Mail.app with this script :
tell application "BetterTouchTool" update_touch_bar_widget "UUID" end tell
This doesn't really work though
- Do you know any other Mail program for macOS that supports Apple Script? I use a special email address for my forum inscriptions, and would like have it only on macOS, not on iOS.
Thanks for all your ideas and hints!