Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Apple Quit Script

Does anyone have a script I can use to quit all the applications that are open? I have tried using the following but it doesn't seem to work.


Thanks


M


tell application "System Events" to set the visible of every process to true

set white_list to {"Finder"}

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

on error

tell the current application to display dialog "An error has occurred!" & return & "This script will now quit" buttons {"Quit"} default button 1 with icon 0

end try


Th

MacBook Pro, OS X Yosemite (10.10), 13' 2.5 GHz i5 4GB RAM Early 2013

Posted on Jul 6, 2015 2:01 AM

Reply

There are no replies.

Apple Quit Script

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.