• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Luxus ist für jeden genau so individuell wie Kitsch, deshalb steht der Luxus auch im Mittelpunkt des August-Wettbewerbes, als Kontrast-Programm sozusagen. Macht mit! Zum Wettbewerb --> Klick

Regel - Emails als PDF Speichern

henn-d

Gloster
Registriert
08.02.09
Beiträge
63
Hallo ATler,

ich komme mal wieder nicht weiter. Ich will mit Hilfe einer Regel bestimmte Emails automatisch als PDF in einem Ordner speichern. Leider komme ich damit nicht weiter. Die Regel ist kein Problem, aber wie erstellt man aus einer Email ein PDF und speichert es in einem Ordner. Nach einiger Recherche habe ich das angehängte Apple-Skript gefunden. Es macht aber leider nur teilweise, was es soll. Die Art, wie in den Ordner gespeichert wird, finde ich unglücklich gelöst (vor allem, da ich gern einen Ordner im User Verzeichnis wählen würde und nicht auf dem Desktop), weiß aber auch nicht, wie es besser geht.

Code:
[B]tell[/B] [COLOR=#0433ff][I]application[/I][/COLOR] "Mail"
[COLOR=#0433FF][B]activate[/B][/COLOR]
[B]tell[/B] [COLOR=#0433ff][I]application[/I][/COLOR] "System Events"
[COLOR=#0433FF][COLOR=#000000][B]tell[/B] [/COLOR][I]application process[/I][COLOR=#000000] "Mail"[/COLOR][/COLOR]
[COLOR=#0433FF][B]keystroke[/B][COLOR=#000000] "p" [/COLOR]using[COLOR=#5d3292]command down[/COLOR][/COLOR]
[B]repeat[/B] [B]until[/B] [COLOR=#0433ff][I]sheet[/I][/COLOR] 1 [B]of[/B] [COLOR=#0433ff][I]window[/I][/COLOR] 1 [COLOR=#0433ff][B]exists[/B][/COLOR]
[COLOR=#5E6161]-- just wait[/COLOR]
[B]end[/B] [B]repeat[/B]
[COLOR=#0433FF][B]click[/B][I]menu button[/I][COLOR=#000000] "PDF" [B]of[/B] [/COLOR][I]sheet[/I][COLOR=#000000] 1 [B]of[/B] [/COLOR][I]window[/I][COLOR=#000000] 1[/COLOR][/COLOR]
[COLOR=#0433ff][B]click[/B][/COLOR] [COLOR=#0433ff][I]menu item[/I][/COLOR] "Save as PDF…" [B]of[/B] [COLOR=#0433ff][I]menu[/I][/COLOR] 1 [B]of[/B] [COLOR=#0433ff][I]menu button[/I][/COLOR] "PDF" [B]of[/B] [COLOR=#0433ff][I]sheet[/I][/COLOR] 1 [B]of[/B] [COLOR=#0433ff][I]window[/I][/COLOR] 1
[COLOR=#5E6161][COLOR=#012fbe][B]delay[/B][/COLOR][COLOR=#000000] 1 [/COLOR]-- 1 second should be enough[/COLOR]
[COLOR=#0433FF][B]keystroke[/B][COLOR=#000000] "d" [/COLOR]using[COLOR=#5d3292]command down[/COLOR][/COLOR]
[B]if[/B] [COLOR=#812fdc]value[/COLOR] [B]of[/B] [COLOR=#0433ff][I]checkbox[/I][/COLOR] 1 [B]of[/B] [COLOR=#0433ff][I]window[/I][/COLOR] 1 [B]is[/B] 0 [B]then[/B] [COLOR=#0433ff][B]click[/B][/COLOR] [COLOR=#0433ff][I]checkbox[/I][/COLOR] 1 [B]of[/B] [COLOR=#0433ff][I]window[/I][/COLOR] 1
[COLOR=#0433FF][B]click[/B][I]radio button[/I][COLOR=#000000] 2 [B]of[/B] [/COLOR][I]radio group[/I][COLOR=#000000] 1 [B]of[/B] [/COLOR][I]group[/I][COLOR=#000000] 2 [B]of[/B] [/COLOR][I]window[/I][COLOR=#000000] 1[/COLOR][/COLOR]
[COLOR=#0433FF][B]select[/B][I]item[/I][COLOR=#000000] 1 [B]of[/B] ([/COLOR][I]rows[/I][COLOR=#000000] [B]of[/B] [/COLOR][I]outline[/I][COLOR=#000000] 1 [B]of[/B] [/COLOR][I]scroll area[/I][COLOR=#000000] 2 [B]of[/B] [/COLOR][I]splitter group[/I][COLOR=#000000] 1 [B]of[/B] [/COLOR][I]group[/I][COLOR=#000000] 2 [B]of[/B] [/COLOR][I]window[/I][COLOR=#000000] 1 [B]whose[/B] [/COLOR][COLOR=#812fdc]value[/COLOR][COLOR=#000000] [B]of[/B] [/COLOR][I]static text [/I][COLOR=#000000]1 [B]is[/B] "Prints")[/COLOR][/COLOR]
[COLOR=#0433FF][B]keystroke[/B][COLOR=#000000] "o" [/COLOR]using[COLOR=#5d3292]command down[/COLOR][/COLOR]
[COLOR=#0433ff][B]keystroke[/B][/COLOR] "Email Date " & [COLOR=#812fdc]short date string[/COLOR] [B]of[/B] ([COLOR=#012fbe][B]current date[/B][/COLOR]) & [COLOR=#812fdc]space[/COLOR] & [COLOR=#812fdc]time string[/COLOR] [B]of[/B] ([COLOR=#012fbe][B]current date[/B][/COLOR])
[COLOR=#0433FF][B]keystroke[/B][COLOR=#812fdc]return[/COLOR][/COLOR]
[B]end[/B] [B]tell[/B]
[B]end[/B] [B]tell[/B]
[B]end[/B] [B]tell[/B]

Mich wundert, dass es im Automator keine entsprechende Funktion gibt.

Hat jemand eine gute Idee, wie man das eleganter lösen kann? Bin für jeden Tipp dankbar!

Viele Grüße
Henn-D
 

henn-d

Gloster
Registriert
08.02.09
Beiträge
63
Hallo Jan,

vielen Dank!

Das ist genau was ich suche! Google hat mich auch schon dorthin geführt. Leider ist dieses Script unter OS X 10.8 nicht lauffähig. Steht in den Kommentaren.

MailSteward ist sicher eine gute Alternative. Ich würde diese (eigentlich einfache?) Aufgabe jedoch gern mit Bordmitteln lösen.

Viele Grüße
Henn-D
 

j@n

Eierleder-Apfel
Registriert
03.01.07
Beiträge
1.230
Ah okay. Entschuldige, die Kommentare hatte ich nicht gelesen, weil es so vielversprechend aussah. Aber besser als „Usereingaben simulieren“, was Dein obiges Skript tut, weiß ich es dann leider auch nicht.