• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Viele hassen ihn, manche schwören auf ihn, wir aber möchten unbedingt sehen, welche Bilder Ihr vor Eurem geistigen Auge bzw. vor der Linse Eures iPhone oder iPad sehen könnt, wenn Ihr dieses Wort hört oder lest. Macht mit und beteiligt Euch an unserem Frühjahrsputz ---> Klick

Besprechungseinladungen automatisch annehmen/Verarbeiten

Mittagspause

Allington Pepping
Registriert
16.07.09
Beiträge
192
Hallo,
ich erhalte Besprechungseinladungen über Lotus Notes oder Outlook per Email (ist ein ics-File dabei) an mein MobileMe oder t-online-Account zugesendet.
Im iCal habe ich ein Häkchen bei "Besprechungseinladungen automatisch verarbeiten" gesetzt.

Ich möchte nun, dass bei solchen Mails die Einladung automatisch angenommen wird (ohne Bestätigung/Antwort) und sich in den Terminkalender einträgt.

Gibt es hierfür eine Lösung ?

Danke

Mittagspause
 

Mittagspause

Allington Pepping
Registriert
16.07.09
Beiträge
192
so, nachstehende Lösung scheint zu funktionieren (vielleicht interessiert es noch jemand):

property theAttachmentPath : (path to desktop) as Unicode text
property add_events : "Importieren" -- The title of the "Add Events" dialog on your system.
property cal_name : "myCalendar" -- The name of the target calendar.

using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with This_Message in theMessages
repeat with ma in mail attachments of This_Message
set n to name of ma
if n ends with ".ics" then
save ma in file (theAttachmentPath & n)
my import_to_iCal(theAttachmentPath & n)
end if
end repeat
end repeat
end tell
end perform mail action with messages
end using terms from

on import_to_iCal(file_path)
tell application "iCal"
activate
set c to (count events of calendar cal_name)
ignoring application responses
open file file_path
end ignoring
end tell
tell application "System Events"
tell application process "iCal"
set frontmost to true
tell window add_events
repeat until (it exists)
delay 0.2
end repeat
click pop up button 1
repeat until (menu 1 of pop up button 1 exists)
delay 0.2
end repeat
click menu item cal_name of menu 1 of pop up button 1
repeat while (menu 1 of pop up button 1 exists)
delay 0.2
end repeat
click button "OK"
end tell
end tell
end tell
tell application "iCal"
repeat until ((count events of calendar cal_name) > c)
delay 0.2
end repeat
end tell
tell application "Finder" to delete file file_path
end import_to_iCal


Dieses Skript im Skript-Editor einfach abspeichern, anschließend in den Email-Einstellungen eine Regel neu hinterlegen, dass wenn eine Email mit Dateianhang ics kommt, das Skript aúsführen lassen.

Gruß

Mittagspause