"New Mail Since HH:MM" function via AppleScript? Possible?

C

Craig Deutsch

Paul, I assume this question is for you or one of the other
AppleScriptmeisters out there, and I'd like to know if (a) if such an
AppleScript makes sense to anyone but me; (b) such an AppleScript can even
be created, and (c) how much it would cost.

Here's my issue: I have hundreds of folders, so many in fact that I've had
to sub-classify many of the sub-categories by alphabetical letter groups. I
don't always get to new email in any given folder on any given day; thus I
have too many black, bold folders calling my attention. So the notion that
there is BRAND-NEW email that's unread in any particular folder, indicated
by color, would be valuable to me as an "attention grabber." Anyone else
perhaps think so, or am I missing something vis-à-vis the "human factor"
that makes this less useful than I might think, i.e., I'm just creating
another color to ignore?

Anyway, assuming you're with me, I'll assume that if an AppleScript can talk
to assigning folder colors, then this whole thing might be possible;
otherwise it's probably a moot point. If anyone's interested in reading my
proposed methodology, then something I'd find very valuable from the
interface perspective is a way to change folder colors to attract attention
to *newer* mail that has more recently come in. Basically a kind of "New
Mail Since HH:MM function".

Here's by basic "requirements paragraph": An AppleScript could be run
manually or set to run automatically at user-defined intervals such that any
folder containing new mail whose Received time of day is at or after a
user-defined time of day would cause folder icons containing such mail to
change to the user-defined color (remaining bold) and stay that color until
the triggering emails are read or marked read, or until the next daily
target time is reached, thus "resetting" no-longer-qualified folders to
their default black bold. If the target folder is nested, then its parent
folder(s) should also change to the same color for the same duration -- with
one exception: The Inbox should be treated separately and should only
become the target color for the defined period when it, on its own, contains
triggering emails. This avoids an "always on" syndrome that will commonly
be the case when child folders have new emails.

Qualified folders are subject to the AppleScript rule until the next
occurrence of HH:MM, at which time all folders are re-evaluated and folder
colors changed as applicable.

Example 1: I want all new email received after 03:00 local every morning to
be marked red. In this small sample, the folder [Smith, Joe] is a sub-folder
of [S-Z] which is a subfolder of [Friends & Family] which is a subfolder of
[Inbox]. New mail lands in [Smith, Joe] one of two ways: via rule, or it's
manually moved there from the Inbox.

So, if [Smith, Joe] contains unread email received after 03:00 on any given
day, then [Smith, Joe] (not its contents) icon would turn red, as would
[S-Z] and [Friends & Family] until all of the email inside [Smith, Joe], for
which the time received is after the current target [date]/00:00, has been
marked Read or until the AppleScript resets the following day, whichever
comes first. As above, [Inbox] would not reflect the change.

Example 2: An email lands in the Inbox after the target time, and there is
no rule to move it anywhere. The Inbox should turn red following the same
methodology.
 
M

Matthew Smith

Craig Deutsch said:
Paul, I assume this question is for you or one of the other
AppleScriptmeisters out there, and I'd like to know if (a) if such an
AppleScript makes sense to anyone but me; (b) such an AppleScript can even
be created, and (c) how much it would cost.

Here's my issue: I have hundreds of folders, so many in fact that I've had
to sub-classify many of the sub-categories by alphabetical letter groups. I
don't always get to new email in any given folder on any given day; thus I
have too many black, bold folders calling my attention. So the notion that
there is BRAND-NEW email that's unread in any particular folder, indicated
by color, would be valuable to me as an "attention grabber." Anyone else
perhaps think so, or am I missing something vis-à-vis the "human factor"
that makes this less useful than I might think, i.e., I'm just creating
another color to ignore?

........

Example 1: I want all new email received after 03:00 local every morning to
be marked red. In this small sample, the folder [Smith, Joe] is a sub-folder
of [S-Z] which is a subfolder of [Friends & Family] which is a subfolder of
[Inbox]. New mail lands in [Smith, Joe] one of two ways: via rule, or it's
manually moved there from the Inbox.

So, if [Smith, Joe] contains unread email received after 03:00 on any given
day, then [Smith, Joe] (not its contents) icon would turn red, as would
[S-Z] and [Friends & Family] until all of the email inside [Smith, Joe], for
which the time received is after the current target [date]/00:00, has been
marked Read or until the AppleScript resets the following day, whichever
comes first. As above, [Inbox] would not reflect the change.

Example 2: An email lands in the Inbox after the target time, and there is
no rule to move it anywhere. The Inbox should turn red following the same
methodology.

Have you thought of using Mail Views for looking at the mail you want? I
rarely go to a folder to read mail. I use views for display unread
messages. I use folders for archival purposes.
 
C

Craig Deutsch

Well, Matthew, no I haven't. And after looking at the view called "Received
Today," I'm not surprised no one else has replied...it was kinda of one of
those "Duh!" questions. That I completely overlooked those views-- and
instead wrote a missive about a complex coding project to replace it -- is
at least mildly embarrassing.

I'm laughing at my own stupidity! Thanks for pointing that out.

Paul, et.al.: disregard my request. While even if programmatically possible
and even perhaps challenging to do with AppleScript, it's a waste of time.
The "Received Since Launch" and "Received Today" will do just fine.

Thanks, Matthew!


Craig Deutsch said:
Paul, I assume this question is for you or one of the other
AppleScriptmeisters out there, and I'd like to know if (a) if such an
AppleScript makes sense to anyone but me; (b) such an AppleScript can even
be created, and (c) how much it would cost.

Here's my issue: I have hundreds of folders, so many in fact that I've had
to sub-classify many of the sub-categories by alphabetical letter groups. I
don't always get to new email in any given folder on any given day; thus I
have too many black, bold folders calling my attention. So the notion that
there is BRAND-NEW email that's unread in any particular folder, indicated
by color, would be valuable to me as an "attention grabber." Anyone else
perhaps think so, or am I missing something vis-à-vis the "human factor"
that makes this less useful than I might think, i.e., I'm just creating
another color to ignore?

........

Example 1: I want all new email received after 03:00 local every morning to
be marked red. In this small sample, the folder [Smith, Joe] is a sub-folder
of [S-Z] which is a subfolder of [Friends & Family] which is a subfolder of
[Inbox]. New mail lands in [Smith, Joe] one of two ways: via rule, or it's
manually moved there from the Inbox.

So, if [Smith, Joe] contains unread email received after 03:00 on any given
day, then [Smith, Joe] (not its contents) icon would turn red, as would
[S-Z] and [Friends & Family] until all of the email inside [Smith, Joe], for
which the time received is after the current target [date]/00:00, has been
marked Read or until the AppleScript resets the following day, whichever
comes first. As above, [Inbox] would not reflect the change.

Example 2: An email lands in the Inbox after the target time, and there is
no rule to move it anywhere. The Inbox should turn red following the same
methodology.

Have you thought of using Mail Views for looking at the mail you want? I
rarely go to a folder to read mail. I use views for display unread
messages. I use folders for archival purposes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top