Mail Search surrogate
Mail Search surrogate
- Subject: Mail Search surrogate
- From: Gil Dawson <email@hidden>
- Date: Wed, 8 Apr 2009 22:42:14 -0700
Unhappy with the limitations of the Search feature in mail, I thought
I'd try my hand at an AppleScript. For my first example, I'm looking
for an exhaustive list of all messages which were either sent or
received between BeginTime and EndTime... etc.
You know, the stuff Eudora was good at. :-(
A few questions:
1) Has anybody done this already?
2) How would you cycle through all messages?
2a) Using Smile, the following program...
tell application "Mail"
set myAccts to every account
log "count of myAccts=" & (count of myAccts) -- 5
repeat with anAcct in myAccts
log "name of anAcct=" & name of anAcct -- looks right
set AllBoxes to every mailbox of anAcct
repeat with aBox in AllBoxes
log "name of aBox=" & name of aBox -- only 4?
end repeat
end repeat
end tell
...logs just four mailboxes,
"INBOX"
"Drafts"
"Sent Messages"
"Deleted Messages"
...how can I reference the other couple dozen mailboxes that I created?
2b) The .emlx files in ~/Library/Mail/ could be visited, but the
folder structure is a bit complicated. Has anyone written a program
to visit all these files?
2c) The following program and some variations I tried...
set BeginDate to (date "Tuesday, March 31, 2009 10:00:00 AM")
tell application "Mail"
set AftMsgs to every message whose date received is greater than
BeginDate
end tell
... all get an error message. This one gets:
Can't make every message whose date received > date "Tuesday, March
31, 2009 10:00:00 AM" into type reference.
Any suggestions?
--Gil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden