Macht besonders viel Spaß, wenn der Schreibtisch besonders voll ist:
tell application “System Events”
set visible of every process to false
end tell
tell application “Finder”
activate
close every window
repeat with i from 1 to 1
set arrangement of icon view options of window of desktop to arranged by kind
delay 0.25
set arrangement of icon view options of window of desktop to arranged by name
delay 0.25
set arrangement of icon view options of window of desktop to arranged by size
delay 0.25
set arrangement of icon view options of window of desktop to arranged by creation date
delay 0.25
set arrangement of icon view options of window of desktop to arranged by modification date
delay 0.25
set arrangement of icon view options of window of desktop to arranged by kind
delay 0.25
end repeat
end tell