Is there a script that can quit all running applications in the dock?
thanks
Is there a script that can quit all running applications in the dock?
thanks
Hi hwaxman,
You could try:
set goodProcs to {"Finder", "Script Editor"} -- Names of apps you want left
tell application "System Events" to set theProcs to name of every process whose visible is true
repeat with myProc in theProcs
if myProc is not in goodProcs then tell application myProc to quit saving yes
end repeat
The main problem with this approach is that some apps may open save dialogs.
Best wishes
John M
I’ll try it. Many thanks
Thanks John for your script. It works well for me.
It would be great for me if the script is able to Quit All apps but leaves a user defined app (such as MSN Messager, and/or Mail, etc) running.
Could I trouble you to enhance your script to do that for me please?
Thank you.
This does work for me in Panther. I changed the ‘yes’ to no.
When I try the script in Tiger it tries to open OS9 which isn’t there and it fails. I don’t know how to get around this. Obviously I no next to nothing about scripting.
Thanks