Ergebnis 1 bis 1 von 1
- 11.06.2011, 19:39 #1
Gesamte Mail-Inbox bei Geektool darstellen
Hallo zusammen,
habe heute mal Geektool reaktiviert und mir ein paar Geeklets aus dem Internet geladen und damit den Desktop "aufgehübscht". Dabei ist mir ein Geeklet ins Auge gefallen, welches den Posteingang der Mail.app ausliest und eine bestimmte Anzahl an Mails (hier zehn) mit Absender und Betreff darstellt. Problem hierbei ist: Ich habe insgesamt drei Mailkonten bei Mail eingerichtet und er stellt leider nur die Mails aus dem ersten Account dar. Dadurch werden eben nur die zehn aktuellsten Mails eines Accounts angezeigt und nicht die generell neuesten, was schon irgendwie blöd ist.
Das Script sieht wie folgt aus:
Wäre schön, wenn mir jemand erklären könnte, wie man das Script dazu bringt, den gesamten Posteingang abzufragen und nicht nur das erste Postfach. Was halt verwunderlich ist, dass im Script "inbox" abgefragt wird, er aber automatisch in den ersten Account geht. Die Frage wurde auf Macosxtips.co.uk auch schon gestellt, aber leider nicht beantwortet.Code:#!/usr/bin/osascript set numberOfEmails to 10 set esc to ASCII character 27 on replace_chars(this_text, search_string, replacement_string) set text item delimiters to the search_string set the item_list to every text item of this_text set AppleScript's text item delimiters to the replacement_string set this_text to the item_list as string set AppleScript's text item delimiters to "" return this_text end replace_chars tell application "Mail" set theOutput to " " set theList to messages 1 thru numberOfEmails of inbox repeat with theMessage in theList if theMessage's read status is not true then set theOutput to theOutput & esc & "[35m• " & esc & "[0m" else set theOutput to theOutput & " " end if set theSender to extract name from sender of theMessage set theSubject to subject of theMessage set theSubject to esc & "[1m" & theSubject & esc & "[0m" set theBody to characters 1 thru 100 of content of theMessage set theBody to my replace_chars(my replace_chars(theBody, ASCII character 10, ""), ASCII character 13, "") set theOutput to theOutput & theSender & " – " & theSubject & " " end repeat theOutput end tell
Vielen Dank und noch einen schönen Abend,
Snoopy181MacBook Unibody 13" ('08) mit OS X Lion.


Zitieren
