On Tue, Jun 17, 2003, Andy Fragen [EMAIL PROTECTED], invoked powers
within the internet realm, to proclaim ...
>Unfortunately this still has the problem of deleting something that is in
>a place where messages will be deleted. You could alternatively label
>these daily folders as Trash 1, Trash 2, etc. Don't get me wrong I think
>what you've described is a very valid approach. You could also set up the
>Delete Aged Messages script to delete one folder for all messages over 7
>days. That should accomplish pretty much the same thing. Using labels to
>extend PM is great, I've actually written a script to archive labeled
>messages to an Archive folder.
>
>Unfortunately PM suffers from a problem. There is no way to access a
>message that is not visible, except if it's in the Mail Trash and you
>empty trash from the menu or at quit. Of course, maybe that's the
>solution to the problem -- out of sight, out of mind. Use the General
>prefs to file read messages in a Read Messages folder and set the
>folder's view to "View Unread Only". It's not a perfect solution but...
>
>I will also state that if you have a folder that has view unread only and
>it is listed as one of the folders for the Delete Aged Messages script to
>run any messages that are not visible, all the read ones, will not be
>deleted. I know this because I've tried to have these ones deleted as
>well but there is no scripting argument that stipulates a message's
>status as unread or read.
I agree that "Mail Trash" is not the ideal place to store messages one
may want to keep. On the other hand, people have their reasons, and
peculiarities and expect/hope the mail program to give them some
flexibility. I would think AppleScript would provide the flexibility to
the user that the programmers did not think of. We don't all work or play
or organize in the same way, so it would be difficult for the programmers
to think of every possible usage scenario from the user's perspective.
Personally, if I have any ambivalence about permanently disposing of any
messages, I can rest assured that a little time will help make up my
mind. I also make sure my preferences are set to disable any option to
auto-delete any of my messages. I'd much rather get my hands dirty.
PowerMail does allow one to get the "read" or "unread" status of a
message - unless I misunderstood your last sentence. Here's another
AppleScript to think on:
(* Begin AppleScript *)
property thisWeeksLabel : 1
to getWeekFromDay(dayGiven)
if the dayGiven is in {1, 2, 3, 4, 5, 6, 7} then
set {inTheWeekOfTxt, weekNum} to {"Week 1", 2}
else if the dayGiven is in {8, 9, 10, 11, 12, 13, 14} then
set {inTheWeekOfTxt, weekNum} to {"Week 2", 3}
else if the dayGiven is in {15, 16, 17, 18, 18, 20, 21} then
set {inTheWeekOfTxt, weekNum} to {"Week 3", 4}
else if the dayGiven is in {22, 23, 24, 25, 26, 27, 28} then
set {inTheWeekOfTxt, weekNum} to {"Week 4", 5}
else if the dayGiven is in {29, 30, 31} then
set {inTheWeekOfTxt, weekNum} to {"Week 5", 6}
end if
say "This is " & inTheWeekOfTxt -- ** optional
set thisWeeksLabel to weekNum
my changeMsgLabel(thisWeeksLabel)
end getWeekFromDay
to changeMsgLabel(labelNumberGiven)
tell application "PowerMail"
set the trashedMsgs to the messages of the message container
"Mail Trash"
repeat with msgUp in the trashedMsgs
if the status of the msgUp is not unread then
set the msgLabel to the label of msgUp
if the msgLabel is 0 then
set the label of the msgUp to
labelNumberGiven
end if
end if
end repeat
end tell
end changeMsgLabel
set the dayOfMonth to the day of the (current date)
my getWeekFromDay(dayOfMonth)
beep
(* End AppleScript *)
The above script can easily be modified to delete messages that are
labeled for a specific week while setting the week label on other
messages. It would be up to the user to decide how to automate the
AppleScript or always run it manually.
Yes, I can see how it would be beneficial to do something like;
set the view of message container "Name of Folder" to View All
or
set the view of the current message container to "View All"
cheshirekat
--
* 867 PowerBook G4 * OS X 10.2.5 * 768 MB Ram *
* Addictions: iTunes 4 * WarCraft * The Sims *