Möchte das hier mal aufwärmen: habe es trotz zahlreicher Versuche (mit obenstehenden Scripts und Automator) und Google nicht geschafft unter Leopard ein lauffähiges Script einzusetzen, dass alle Mail- Anhänge automatisch in einen Ordner schaufelt. Das hier (gefunden auf macscripter)schafft es immerhin mit Unterordnern, weiß jemand wie man das umändern könnte??:
set destinationFolder to choose folder with prompt "Choose destination folder to save attachments in"
tell application "Mail"
set theMessages to selection
repeat with oneMessage in theMessages
set {subject:theSubject, mail attachment:theAttachments, id:theID, content:theContent} to oneMessage
if theSubject contains ":" then -- filter colons in subjects to avoid HFS path problems
set {ASTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
set theSubject to text items of theSubject
set AppleScript's text item delimiters to "_"
set theSubject to theSubject as Unicode text
set AppleScript's text item delimiters to ASTID
end if
set folderName to (theID as Unicode text) & "_" & theSubject
try
tell application "Finder" to set attachmentFolder to make new folder at destinationFolder with properties {name:folderName}
on error
tell application "Finder" to set attachmentFolder to folder folderName
end try
repeat with oneAttachment in mail attachments of oneMessage
save oneAttachment in (attachmentFolder as Unicode text) & (name of oneAttachment)
end repeat
write_to_disk of me from theContent into ((destinationFolder as Unicode text) & theSubject & ".txt")
end repeat
end tell
on write_to_disk from theText into target
try
set ff to open for access file target with write permission
write theText to ff
close access ff
return true
on error
try
close access file target
end try
return false
end try
end write_to_disk