Skip to content

Instantly share code, notes, and snippets.

@biojazzard
Created May 31, 2012 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biojazzard/2842462 to your computer and use it in GitHub Desktop.
Save biojazzard/2842462 to your computer and use it in GitHub Desktop.
Applescript AutoQuit Everything
tell application "System Events" to set the visible of every process to true
set white_list to {"Finder", "AppleScript Editor"}
try
tell application "Finder"
set process_list to the name of every process whose visible is true
end tell
repeat with i from 1 to (number of items in process_list)
set this_process to item i of the process_list
if this_process is not in white_list then
tell application this_process
quit
end tell
end if
end repeat
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment