Last active
August 29, 2015 14:07
-
-
Save shmidt/99c50cbeced33a5ce8c0 to your computer and use it in GitHub Desktop.
Shutdown OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
set ProcNm_ to name of every application process whose visible is true | |
repeat with i_ from 1 to count items of ProcNm_ | |
set TarProc_ to item i_ of ProcNm_ | |
try | |
tell application TarProc_ to quit | |
end try | |
end repeat | |
shut down | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment