Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
Kader •->

Anmeldedatum: 06.10.2003 Beiträge: 1
|
Verfasst am: 06.10.2003 - 02:06 Titel: Automatische Anrede aus Entourage-Gruppe? |
|
|
Hallo zusammen,
ich bin noch grün hinter den AppleSkript-Ohren, doch haben diese vernommen, daß hier Spezialisten sitzen...
Ich versuche in Entourage ein Skript zu erstellen, daß aus einer Gruppennachricht die Namen aus dem Adreßbuch ausliest und als Anrede im Textfeld einsetzt und dann als einzelne Mails verschickt.
Das einzelne Verschicken ist mir schon gelungen, will heißen, ich habe ein Skript bei macscripters gefunden (separate messaging) und leicht modifiziert. Jedoch klappt das Auslesen aus den Gruppenadressen und Einsetzen im Textfeld vorher nicht. Also: Wenn im Adreßbuch Name Müller und Titel Herr steht, soll das in der ersten Zeile der Mail stehen. Die Anrede, also "Lieber", "Sehr geehrter" etc. würde ich im Adreßbuch bei Titel reinschreiben. Naja, das würde ich selbst noch mit einem Display-Dialog hinbekommen.
Das Skript sieht bis jetzt so aus und funktioniert gut - wenn das Anredegenerieren da eingesetzt werden könnte, wäre das klasse.
Jedenfalls bin ich auf Eure Anregungen schln sehr gespannt und darf mich vorab schon herzlich bedanken.
Kader
tell application "Entourage"
if class of front window != draft window then
display dialog "Sie müssen eine neue Nachricht zum Senden vorbereitet haben." with icon caution
return
end if
set theMsg to window 1
try
set groupName to (to recipients of theMsg)
set theGroup to group groupName
on error
display dialog "Sie müssen eine Gruppe im Adreßfeld An: Ihrer Nachricht eingegeben haben." with icon caution
return
end try
set theBody to content of theMsg
set theAccount to account of theMsg
set theSubject to subject of theMsg
set theAttachments to {}
if the attachments of theMsg != {} then
set theFiles to the file of every attachment of theMsg
repeat with aFile in theFiles
set end of theAttachments to {file:aFile}
end repeat
end if
set allEntries to (every group entry of theGroup)
repeat with grpEntry in allEntries
set aRecipient to content of grpEntry
make new outgoing message at out box folder with properties {account:theAccount, content:theBody, subject:theSubject, recipient:aRecipient, attachment:theAttachments}
end repeat
set ccR to CC recipients of theMsg
if ccR != "" then
set AppleScript's text item delimiters to {", "}
set ccR to text items of ccR --list of separate cc recipients
set AppleScript's text item delimiters to {""}
repeat with aRecipient in ccR
make new outgoing message at out box folder with properties {account:theAccount, content:theBody, subject:theSubject, recipient:aRecipient, attachment:theAttachments}
end repeat
end if
set bccR to BCC recipients of theMsg
if bccR != "" then
set AppleScript's text item delimiters to {", "}
set bccR to text items of bccR --list of separate cc recipients
set AppleScript's text item delimiters to {""}
repeat with aRecipient in bccR
make new outgoing message at out box folder with properties {account:theAccount, content:theBody, subject:theSubject, recipient:aRecipient, attachment:theAttachments}
end repeat
end if
send --sends out all messages
set subject of theMsg to theSubject & " …[GETRENNTE NACHRICHTEN]"
save window 1 -- saves to drafts folder
close window 1
set delivery status of message -1 of drafts folder to sent
move message -1 of drafts folder to sent mail folder
end tell |
|
Nach oben |
|
 |
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Powered by phpBB © 2001, 2002 phpBB Group Deutsche Übersetzung von phpBB.de
|
|
|