Closing applications

Posted:
in macOS edited January 2014
Occasionally, I have quite a few apps running at the same time in OS X 3.9

Is there a way to close multiple apps or even all of them at once rather than closing them one at a time?

Comments

  • Reply 1 of 12
    meelashmeelash Posts: 1,045member
    Quote:
    Originally Posted by sequitur


    Occasionally, I have quite a few apps running at the same time in OS X 3.9

    Is there a way to close multiple apps or even all of them at once rather than closing them one at a time?



    Logging out will close all of them...



    I'm sure a script or a widget could be written up very easily for this..
  • Reply 2 of 12
    sthiedesthiede Posts: 307member
    Quote:
    Originally Posted by meelash


    Logging out will close all of them...



    I'm sure a script or a widget could be written up very easily for this..



    well sequitur doesnt have dashboard anyways so a widget wouldn't help him here.
  • Reply 3 of 12
    lundylundy Posts: 4,466member
    Here is a script



    CLICK HERE to load the script into Script Editor.



    Once you click the link above, Script Editor on your machine will have the script in a window. Save it to ~/Library/Scripts as an application, giving it any name you want, like Quit All Apps. Then open /Applications/Applescript/Applescript Utility and check the box that is labeled Show Script Menu In Menu Bar and quit Applescript Utility.



    Now any time you want to quit all apps except hidden, background, Finder, and Script Editor, then just choose the script from the Script Menu in the upper right on the menu bar.



    EDIT: Here is the code that gets loaded by the above link



    Quote:

    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

    \ttell application theApp to quit

    end repeat



    If you wanted to "unhide" all hidden apps so they would get quitted also, you would add the line



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



    at the beginning of the script.
  • Reply 4 of 12
    elronelron Posts: 126member
    Quote:
    Originally Posted by sequitur


    Occasionally, I have quite a few apps running at the same time in OS X 3.9

    Is there a way to close multiple apps or even all of them at once rather than closing them one at a time?



    It might not be as fancy as an AppleScript, but when I want to quit a bunch of programs I start cmd+tab'ing. When I hit an app that needs quitting, I take my finger off the tab button, hit Q, and resume cmd+tab'ing.



    fake edit: It just struck met hat I don't remember if you can quit apps from cmd+tab in Panther.
  • Reply 5 of 12
    lundylundy Posts: 4,466member
    Yes - it may not work in Panther but holding down command-tab and then holding down Q until it repeats, is a satisfying though not always completely effective method.
  • Reply 6 of 12
    meelashmeelash Posts: 1,045member
    Quote:
    Originally Posted by elron


    It might not be as fancy as an AppleScript, but when I want to quit a bunch of programs I start cmd+tab'ing. When I hit an app that needs quitting, I take my finger off the tab button, hit Q, and resume cmd+tab'ing.



    fake edit: It just struck met hat I don't remember if you can quit apps from cmd+tab in Panther.



    Excellent point, I'd forgotten all about that, although I use it all the time. The lack of that feature is, along with Expose, one of my biggest peaves when using Windows at work.



    (BTW, you can also hit H to hide instead of Q for quit.)



    Yeah, I believe it works in Panther, too.
  • Reply 7 of 12
    elronelron Posts: 126member
    Quote:
    Originally Posted by lundy


    Yes - it may not work in Panther but holding down command-tab and then holding down Q until it repeats, is a satisfying though not always completely effective method.



    When is it not effective? It's definitely more effort than an AppleScript, but that doesn't mean it doesn't work. I guess it wouldn't work if the app was hung and needed a force quit, but I'd wager that the AppleScript wouldn't work in that case either.
  • Reply 8 of 12
    meelashmeelash Posts: 1,045member
    Quote:
    Originally Posted by elron


    When is it not effective? It's definitely more effort than an AppleScript, but that doesn't mean it doesn't work. I guess it wouldn't work if the app was hung and needed a force quit, but I'd wager that the AppleScript wouldn't work in that case either.



    No, see, there were two things he expressed a desire for at the start of the thread. One was to quit ALL runnning apps, which is what you guys are talking about. The other was quitting selected multiple apps, which is what the cmd-tab and q trick is for.



    EDIT: the "No" part of this message is more for Lundy than you, elron, although I stupidly quoted your post...
  • Reply 9 of 12
    vox barbaravox barbara Posts: 2,021member
    QUOTE=meelash]No, see, there were two things he expressed a desire for at the start of the thread. One was to quit ALL runnning apps, which is what you guys are talking about. The other was quitting selected multiple apps, which is what the cmd-tab and q trick is for.



    EDIT: the "No" part of this message is more for Lundy than you, elron, although I stupidly quoted your post...[/QUOTE




    Than edit away the quote next time, if you don't mind.

    Anyway, the tab thing an' quit does work in Panther too.
  • Reply 10 of 12
    lundylundy Posts: 4,466member
    Quote:
    Originally Posted by elron


    When is it not effective? It's definitely more effort than an AppleScript, but that doesn't mean it doesn't work. I guess it wouldn't work if the app was hung and needed a force quit, but I'd wager that the AppleScript wouldn't work in that case either.



    I meant that when I try it, sometimes the command-tab goes so fast that it continues to miss the Q keystroke.
  • Reply 11 of 12
    meelashmeelash Posts: 1,045member
    Quote:
    Originally Posted by lundy


    I meant that when I try it, sometimes the command-tab goes so fast that it continues to miss the Q keystroke.



    No, you don't hold down cmd-tab. You just press it once then you can press it once to get to the next app in the list or press Q once to quit whatever app's icon is currently selected.
  • Reply 12 of 12
    vox barbaravox barbara Posts: 2,021member
    Quote:
    Originally Posted by meelash


    No, you don't hold down cmd-tab. You just press it once then you can press it once to get to the next app in the list or press Q once to quit whatever app's icon is currently selected.



    You just have to activate cmd-tab, afterward you just hold the

    CMD key alone. So you keep the app list. Afterward you just hit Q,

    as long as you want, in order to quit any app which is next in line.
Sign In or Register to comment.