Is there a way to do this in batches?
Is there a way to do this in batches?
- Subject: Is there a way to do this in batches?
- From: Robert Nicholson <email@hidden>
- Date: Sat, 16 Dec 2006 10:28:26 -0600
This when run on a very large mailbox results in an out of memory error.
Given that duplicates have the same date I would like to be able to
do this in batches without
narrowing the definition of the mailbox and simply let it complete.
Anyway to do something like this in batches?
Ideally I shouldn't need the whole message to select a row just a row
indicie would be enough.
tell application "Mail"
set v to first message viewer
with timeout of 900 seconds
set a to messages of v
end timeout
get count of a
set selected messages of v to {}
set selected_messages to {}
set mids to {}
set s to a reference to mids
repeat with eachMessage in a
try
--set linesHeader to (content of headers of eachMessage whose name
is "Lines")
set mailboxName to the name of mailbox of eachMessage
--set k to all headers of eachMessage
set k to mailboxName & (sender of eachMessage) & (date received of
eachMessage) & (subject of eachMessage)
--set k to message id of eachMessage
if (k is not null) then
if mids contains k then
copy eachMessage to end of selected_messages
else
copy k to the end of s
end if
end if
on error e
end try
end repeat
set selected messages of v to selected_messages
--beep
--display dialog "Finished selecting duplicate messages" buttons
{"OK"} with title "Select Duplicates Script"
end tell
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden