Removing Duplicate emails in mail.app (Apple Script).. question

Joined
Jul 26, 2009
Messages
4
Reaction score
0
Points
1
hi .. i have downloaded an applescript from the net which detects duplicate emails in my mail .. this script works by comparing each email's id .. now i need to know how to detect duplicate email based on their subject and not their id..

This is the Script ..
Code:
tell application "Mail"
	set v to first message viewer
	set a to messages of v
	get count of a
	set selected messages of v to {}
	set mids to {}
	set s to a reference to mids
	repeat with eachMessage in a
		set i to message id of eachMessage
		if mids contains i then
			if (count of selected messages of v) > 0 then
				set selected messages of v to (selected messages of v & {eachMessage})
			else
				set selected messages of v to {eachMessage}
			end if
		else
			copy i to the end of s
		end if
	end repeat
	beep
	display dialog "Finished selecting duplicate messages" buttons {"OK"} with title "Select Duplicates Script"
end tell
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top