Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Quit all apps?

Quit all apps?
Thread Tools
Mac Enthusiast
Join Date: Apr 2001
Location: Camarillo, CA
Status: Offline
Reply With Quote
Apr 16, 2003, 08:46 PM
 
Anybody have an OS X script to quit all running applications?

I used to have one in 9 a long time ago, but I don't have it now and I'm not even certain the OS 9 code will work in OS X...

Basically this is to quit all apps before I play a game...

I tried searching the forum but didn't get any matches...
     
Professional Poster
Join Date: Jun 2000
Status: Offline
Reply With Quote
Apr 16, 2003, 09:24 PM
 
Was it an AppleScript? I'm pretty sure it'd work in OS X as well, unless it's compiled as a program. If it's still the code it should work.
     
Addicted to MacNN
Join Date: Jan 2002
Location: PDX
Status: Offline
Reply With Quote
Apr 16, 2003, 09:30 PM
 
I was just thinking about this the other day. I'd love a script that would quit all apps, including the Finder, and launch Warcraft 3 (or whatever game you want). I want to put as much of my computers resources into Warcraft 3 as possible since it's such a sluggish game on my machine.
     
Professional Poster
Join Date: Jun 2000
Status: Offline
Reply With Quote
Apr 16, 2003, 09:34 PM
 
Originally posted by ::maroma:::
I was just thinking about this the other day. I'd love a script that would quit all apps, including the Finder, and launch Warcraft 3 (or whatever game you want). I want to put as much of my computers resources into Warcraft 3 as possible since it's such a sluggish game on my machine.
When I first read this, I thought OS X should be able to manage memory very well and just swap the RAM the Finder (and other running apps) uses to the HD and give WC3 the extra RAM. Then I remember playing Tony Hawk, I needed to quit all running apps or it wouldn't run smoothly. So much for my theory.

Maybe the extra apps were eating CPU cycles or something...anyone?
     
Professional Poster
Join Date: Jan 2001
Location: Between Sydney and Melbourne
Status: Offline
Reply With Quote
Apr 16, 2003, 09:42 PM
 
Originally posted by ::maroma:::
I was just thinking about this the other day. I'd love a script that would quit all apps, including the Finder, and launch Warcraft 3 (or whatever game you want). I want to put as much of my computers resources into Warcraft 3 as possible since it's such a sluggish game on my machine.
What about a script which quites all apps and automaticaly mounts the Warcraft disk image, then launches the app.

THIS IS MY IDEA! THIS IS MY IDEA! THIS IS MY IDEA! THIS IS MY IDEA!
     
Grizzled Veteran
Join Date: Jan 2002
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Apr 16, 2003, 09:52 PM
 
An inelegant and not really practical solution is to logout and back in again. Another option is if you command tab through apps in the dock and keep holding command down after each tab press press q and the app will quit. This can be very quick, it automatically tabs through running apps only and you just have to hit q on each one.

Wesley
     
Mac Elite
Join Date: Jan 2001
Location: Helsinki, Finland
Status: Offline
Reply With Quote
Apr 17, 2003, 06:39 AM
 
There are a number of daemons and other invisible processes running, which would be nice to quit, too.

Creating a small app that quits everything but the OS required processes could be done, but it could affect input devices etc.

Still, a lot of people wanting to squeeze that extra frame from their system could enjoy it.

J
     
Bobby  (op)
Mac Enthusiast
Join Date: Apr 2001
Location: Camarillo, CA
Status: Offline
Reply With Quote
Apr 17, 2003, 09:46 AM
 
I actually wouldn't want daemons and such to quit... Mainly the apps in my dock and menu bar is what I'm concerned with... This is mainly for games

Originally posted by Judge_Fire:
There are a number of daemons and other invisible processes running, which would be nice to quit, too.

Creating a small app that quits everything but the OS required processes could be done, but it could affect input devices etc.
a
Still, a lot of people wanting to squeeze that extra frame from their system could enjoy it.

J
     
Sal
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status: Offline
Reply With Quote
Apr 17, 2003, 12:12 PM
 
sorry about the double post. The second post includes the routine for Classic.
(Last edited by Sal; Apr 17, 2003 at 12:18 PM. )
     
Sal
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status: Offline
Reply With Quote
Apr 17, 2003, 12:15 PM
 
OK, I'm going to post this on two conditions:

1) that you undertand and agree that you USE THIS SCRIPT AT YOUR OWN RISK
2) provide feedback as to whether it worked or not

This script will kill any processes launched from within the Home folder and within the Apps folder and then restart the computer. Other processess to be targeted can be added to a special list called "kill_list".

Save the script as an applet. And be sure to set the value of the this_appname property at the top of the script to whatever you name the script applet.

Good luck!

PS -- the voices really do add a lot to the script!

Code:
property kill_list : {} property this_appname : "New Kill Script" display dialog "Kill all apps and restart?" & return & return & ¬ "All unsaved data will be lost." buttons {"OK", "Cancel"} default button 2 with icon stop say "I must kill all application processes." using "Bad News" set this_app to (path to me) as string set the apps_folder to (path to "apps" from local domain) as string set the home_folder to (path to "cusr") as string tell application "System Events" set these_processes to every process repeat with i from 1 to the count of processes try set this_process to item i of these_processes set the process_file to (the file of this_process) as string set the process_name to the name of this_process if the process_name is not this_appname then if the process_name is "Classic Support" then say ("killing classic.") using "Zarvox" do shell script "kill `ps axww | awk '/" & "TruBlueEnvironment" & "/ {print $1}' | head`" else if the process_file begins with the apps_folder or ¬ the process_file begins with the home_folder or ¬ the process_name is in the kill_list and ¬ (Classic of this_process is false) then say ("killing " & process_name) using "Zarvox" do shell script "kill `ps axww | awk '/" & process_name & "/ {print $1}' | head`" end if end if end try end repeat say "All processes have been stopped for now." using "Pipe Organ" say "Restarting computer." using "Trinoids" end tell tell application "Finder" ignoring application responses restart end ignoring end tell
     
Sal
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status: Offline
Reply With Quote
Apr 17, 2003, 06:27 PM
 
Any comments? Results?
     
Bobby  (op)
Mac Enthusiast
Join Date: Apr 2001
Location: Camarillo, CA
Status: Offline
Reply With Quote
Apr 18, 2003, 12:08 AM
 
Oh my gosh, this script corrupted my entire hard drive!!! I hate you! I hate you!! How could you do such a thing, this is all your fault!!!!


Originally posted by Sal:
[B]OK, I'm going to post this on two conditions:

1) that you undertand and agree that you USE THIS SCRIPT AT YOUR OWN RISK
2) provide feedback as to whether it worked or not

This script will kill any processes launched from within the Home folder and within the Apps folder and then restart the computer. Other processess to be targeted can be added to a special list called "kill_list".

Save the script as an applet. And be sure to set the value of the this_appname property at the top of the script to whatever you name the script applet.

Good luck!

PS -- the voices really do add a lot to the script!










Just kidding!!!! I modified the script to keep it from restarting, and it works GREAT!!!! This is EXACTLY what I needed!!!!!!

Thank You!!!!
     
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 18, 2003, 12:37 AM
 
how bout a simpler one without all the voices to just quit all applications and launch RtCW?
     
Bobby  (op)
Mac Enthusiast
Join Date: Apr 2001
Location: Camarillo, CA
Status: Offline
Reply With Quote
Apr 18, 2003, 10:18 AM
 
Originally posted by 7Macfreak:
how bout a simpler one without all the voices to just quit all applications and launch RtCW?
What I made mine do is to just quit... I deleted all the say lines, and also deleted the last segment to tell finder to restart... I also set it up to ignore a specific aplication. If you wanted it to open another application after it quits everything else you would just need to add it twards the end of the scipt...
     
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 19, 2003, 04:51 AM
 
cool
will try that. but i'm not very experienced with applescript so i MIGHT not get it right.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2