Adrian Nier Code

Back to overview

Restart Finder

Last modification: Friday, May 01, 2009 11:38 pm

Restarts the Finder gracefully

Implementation

-- Quit the Finder
tell application "Finder" to quit

-- Wait until it is not running
repeat 100 times
   tell application "System Events"
      if (exists process "Finder") is false then exit repeat
   end tell
   delay 0.1
end repeat

-- Launch the Finder
tell application "Finder" to launch