L
Lustmolch
Aktives Mitglied
Thread Starter
- Dabei seit
- 06.04.2010
- Beiträge
- 244
- Reaktionspunkte
- 0
Hi,
ich möchte folgendes:
In einem email account in Mail sollen bei sämtlichen Mails die Anhänge haben, diese anhänge sofort in einem Ordner auf der Festplatte abgespeichert werden.
So sieht mein Script aus, ich muss dazu sagen habe das nicht selbst gemacht da ich ein Laie noch bin .... habe es schon länger mal aus dem Netz, weis leider nicht mehr woher. Ich habe den Ort, an den die Anhänge gespeichert werden geändert, nur leider speichert es keine Anhänge - findet jemand den Fehler ?
grüße und dank
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
set theOutputFolder to "Macintosh HD:Users:Bofiocuments:Tippspiel:2010/2011:Tagestipps:"
tell application "Mail"
set theMessage to item 1 of theMessages
set theAttachments to every attachment of content of theMessage
repeat with a from 1 to length of theAttachments
set theAttachment to item a of theAttachments
try
set theAttachmentName to name of theAttachment
set theSavePath to theOutputFolder & theAttachmentName
save theAttachment in theSavePath
end try
end repeat
end tell
end perform mail action with messages
end using terms from
ich möchte folgendes:
In einem email account in Mail sollen bei sämtlichen Mails die Anhänge haben, diese anhänge sofort in einem Ordner auf der Festplatte abgespeichert werden.
So sieht mein Script aus, ich muss dazu sagen habe das nicht selbst gemacht da ich ein Laie noch bin .... habe es schon länger mal aus dem Netz, weis leider nicht mehr woher. Ich habe den Ort, an den die Anhänge gespeichert werden geändert, nur leider speichert es keine Anhänge - findet jemand den Fehler ?
grüße und dank
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
set theOutputFolder to "Macintosh HD:Users:Bofiocuments:Tippspiel:2010/2011:Tagestipps:"
tell application "Mail"
set theMessage to item 1 of theMessages
set theAttachments to every attachment of content of theMessage
repeat with a from 1 to length of theAttachments
set theAttachment to item a of theAttachments
try
set theAttachmentName to name of theAttachment
set theSavePath to theOutputFolder & theAttachmentName
save theAttachment in theSavePath
end try
end repeat
end tell
end perform mail action with messages
end using terms from