AppleScript to delete Eudora message with attachment
AppleScript to delete Eudora message with attachment
- Subject: AppleScript to delete Eudora message with attachment
- From: David Crowe <email@hidden>
- Date: Wed, 29 Oct 2003 08:39:15 -0700
Following is an applescript that deletes the frontmost Eudora email
message, with all attachments, and then opens up another message (the
oldest one in mailbox "In" assuming they are sorted by date. You may
find this useful. It is best used when attached to a hot key via
QuicKeys or equivalent:
tell application "Eudora"
set mref to a reference to message 1
set j to count attachments of mref
set AttachmentList to {}
repeat with i from 1 to j
set AttachmentList to AttachmentList & attachment i of mref
end repeat
tell application "Finder"
repeat with aFile in AttachmentList
try
delete aFile as alias
on error
display dialog "Cannot delete
attachment: " & aFile as string
end try
end repeat
end tell
move mref to end of mailbox "Trash"
-- Open oldest unread message
set MsgCount to count messages in mailbox "In"
repeat with i from 1 to MsgCount
if status of message i of mailbox "In" = unread then
open message i of mailbox "In"
exit repeat
end if
end repeat
end tell
- David Crowe
_______________________________________________
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.