##©hubionmac.com 17.02.2013 -Urlaubstage zählen
set myweekdays to {Monday, Tuesday, Wednesday, Thursday, Friday}
set triggerString to "urlaub"
set urlaubscount to 0
tell application "iCal"
set thecal to my returntheCal()
tell thecal
set e to every event
repeat with i from 1 to count of e
set te to item i of e
if summary of te contains triggerString then
set s to start date of te
set enddate to end date of te
repeat until s ≥ enddate
set currentday to weekday of s
if currentday is in myweekdays then
set urlaubscount to urlaubscount + 1
end if
set s to s + 86400
end repeat
end if
end repeat
end tell
activate
display dialog "Habe " & urlaubscount & " Ulaubstage gezählt, exklusive Samstage und Sonntage"
end tell
on returntheCal()
tell application "iCal"
set writeableCals to every calendar whose writable is true
set nonWriteableCals to every calendar whose writable is false
set writeableCalNames to {}
set writeableCalIDs to {}
set nonwriteableCalNames to {}
set nonwriteableCalIDs to {}
repeat with i from 1 to count of writeableCals
set writeableCalNames to writeableCalNames & {(i & ": " & name of item i of writeableCals as text)}
set writeableCalIDs to writeableCalIDs & {uid of item i of writeableCals}
end repeat
repeat with i from 1 to count of nonWriteableCals
set nonwriteableCalNames to nonwriteableCalNames & {("_" & i & ": " & name of item i of nonWriteableCals as text)}
set nonwriteableCalIDs to nonwriteableCalIDs & {uid of item i of nonWriteableCals}
end repeat
set thecalname to (choose from list writeableCalNames & nonwriteableCalNames) as text
if thecalname does not start with "_" then
set theIndex to (word 1 of thecalname) as integer
set thecalID to item theIndex of writeableCalIDs
else
set thecalname to (characters 2 through -1 of thecalname) as text
set theIndex to (word 1 of thecalname) as integer
set thecalID to item theIndex of nonwriteableCalIDs
end if
set thecal to calendar id thecalID of application "iCal"
end tell
end returntheCal
Kommt es beim Klonen einer HD mit dem Carbon Copy Cloner zu Fehlern, kann man die Liste der nicht kopierten Dateien als .cccerrors-Datei sichern. Dummerweise handelt es sich dabei um eine binär kodierte plist und das einfach Kopieren aller Dateipfade bei denen es Probleme gab, ist schlicht kein Feature der Software (so scheint es mir).
Nun, dieses Quick&Dirty-Droplet konvertiert die plist und kopiert alle DateiPfade daraus in die Zwischenablage.
Ein Freund von mir verschickt regelmäßig Emails mit Info-Material, damit er die Emails nicht unnötig aufbläst legt er diese Dateien in seiner DropBox ab und in den Mails fügt er nur noch die entsprechenden Links dazu ein.


AppleScript: Email als PDF speichern, mit Attachments für 10.8