Selecting messages in Outlook Express
Selecting messages in Outlook Express
- Subject: Selecting messages in Outlook Express
- From: Christian Boyce <email@hidden>
- Date: Fri, 7 Mar 2003 00:27:30 -0800
Thanks to everyone who helped me with figure out how to select messages
in Outlook's Sent Items folder based on addressee and time sent. I now
have a script that works. It will be a time-saver and will free up
someone here to do other things.
I wonder if there is a more efficient way to get the list of messages
sent today. What I'm doing now is setting a list of messages this way:
set thedate to the (current date)
tell me to set midnight to date (date string of thedate)
tell application "Outlook Express"
set themessages to (every message of folder "Sent Items" whose display
name of address of first recipient contains "Christian's Phone" and
time sent >midnight and time sent < thedate)
end tell
As the number of items in the Sent Items folder grows, the script above
will take longer and longer. As it is, it takes longer than I'd like. I
am thinking that I can (somehow) compare the date of the sent message
to the current date, and if it is not from the same day, stop looking
at messages. This assumes that the messages are sorted by date and that
there is a way to get out of the "every message of" step without
actually looking at every message.
In practice, we are likely to have about 20 messages in "themessages"
each day. In this case, it might make sense to make a loop that steps
through the messages until it finds one that is from yesterday, and
then exits the loop. In general, though, is there a way to use the
"every message of" method AND bail out early?
Thanks again to all who helped. That bit about recipients being a
record and not a string as I'd initially thought was particularly
enlightening. Indeed, I had been making some erroneous assumptions
about messages and their properties, figuring that if I could make a
message with properties x, y, and z I would be able to "get" those
properties in a similar fashion. With recipients, we can't, at least
not the way I was doing it.
--
Christian Boyce
310-452-3720
http://www.christianboyce.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.