tell application "System Events" to set the visible of every process to true
tell application "System Events" to set theApps to (name of every process whose visible is true and name is not "Finder" and name is not (my name as text))
repeat with theApp in theApps
tell application theApp to quit
end repeat
tell application "System Events" to set theApps to (name of every process whose visible is true and name is not "Finder" and name is not (my name as text))
repeat with theApp in theApps
tell application theApp to quit
end repeat