Lexiepex

Q: A method to quit all apps at once

Quit all open apps.

I came about a thread where someone wanted to know if all apps must be closed before the mac is shutdown.

In the discussion another person asked why it is not possible to close all apps at once.

I remembered having read that one can make a solution for that with Automator easily.

 

This is how to make  a very simple tool to quit all open apps with Automator (in the Applications folder).

Here is how to do it:

- Open the Automator app,

Pic1.jpg

 

- choose create a new „application“,

Pic2.jpg

 

- in the search box type „Quit“, then drag the „Quit All Applications“ option to the right side,

Pic3.jpg

 

- you can set the apps to ask to save changes or not

pic4.jpg

 

- save this workflow as an application and name it for example „QuitAll“,

Pic5.jpg

 

- I put it in Applications, but it will run from everywhere,

pic6.jpg

 

This functions as a self contained app and it is very quick.

 

You can change the app icon in the standard way:

- select QuitAll and select an icon you want to set to QuitAll, for both „get Info“,

- select the Icon, copy from the menu,

- then select the icon on the new „app“ and paste from the menu,

pic7.jpg

 

- see he result,

pic8.jpg

 

(Note: I have found this QuitAll icon somewhere in the internet).

Posted on May 22, 2016 11:15 AM

Close

Q: A method to quit all apps at once

  • All replies
  • Helpful answers

  • by leroydouglas,

    leroydouglas leroydouglas May 22, 2016 11:53 AM in response to Lexiepex
    Level 7 (24,036 points)
    Notebooks
    May 22, 2016 11:53 AM in response to Lexiepex

    Lexiepex wrote:

     

    Quit all open apps.

    I came about a thread where someone wanted to know if all apps must be closed before the mac is shutdown.

     

     

    My experience is this is not routinely necessary—fact is counter productive. The new OS X "memory compression" manages apps and memory very efficiently and effectively.

     

    "Memory compression is a triple play... It’s a performance win; compressing and decompressing data in RAM is much faster than reading from and writing to disk, even an SSD. It’s an energy win; the less time spent moving data between RAM and disk, the more time the system can spend in its idle state. And finally, it’s a capability win; ... can handle much more demanding workloads than previous versions of OS X"

     

    In shutting down the Mac it is  much faster if you let the OS take care of the shut down  of all apps and reopen all apps on reboot.

    9TVGX.png

    In this way you can pick up where you left off in record time.

     

     

     

     

    MacBook Pro (15-inch Mid 2012), OS X El Capitan(10.11.5), i7 480GB SSD 16GB RAM iPhone5 iOS9.3.2, Parallels10.0.2, HP OfficeJet Pro 8620

  • by pinkstones,

    pinkstones pinkstones May 22, 2016 11:54 AM in response to leroydouglas
    Level 5 (4,209 points)
    Safari
    May 22, 2016 11:54 AM in response to leroydouglas

    leroydouglas wrote:

     

    Lexiepex wrote:

     

    Quit all open apps.

    I came about a thread where someone wanted to know if all apps must be closed before the mac is shutdown.

     

     

    My experience is this is not routinely necessary—fact is counter productive. The new OS X manages apps and memory very efficiently and effectively.

     

    In shutting down the Mac it is  much faster if you let the OS take care of the shut down  of all apps and reopen all apps on reboot.

     

    9TVGX.png

    In this way you can pick up where you left off in record time.

     

     

     

     

    MacBook Pro (15-inch Mid 2012), OS X El Capitan(10.11.5), i7 480GB SSD 16GB RAM iPhone5 iOS9.3.2, Parallels10.0.2, HP OfficeJet Pro 8620

     

     

    I don't want OS X to reopen all apps on reboot, which is why I shut everything down before I shut down the computer.  When I start everything back up again the next morning, I'll manually open the apps I want open at that time.  So for me, something like this would be interesting to try.

  • by Lexiepex,

    Lexiepex Lexiepex May 22, 2016 12:49 PM in response to leroydouglas
    Level 6 (10,536 points)
    Mac OS X
    May 22, 2016 12:49 PM in response to leroydouglas

    Do I have to change the text? because it was not my intention to suggest that this has to be done regularly. I have posted this as a User Tip which I had to do in a bet...

  • by leroydouglas,Helpful

    leroydouglas leroydouglas May 23, 2016 1:02 AM in response to Lexiepex
    Level 7 (24,036 points)
    Notebooks
    May 23, 2016 1:02 AM in response to Lexiepex

    Lexiepex wrote:

     

    Do I have to change the text? because it was not my intention to suggest that this has to be done regularly. I have posted this as a User Tip which I had to do in a bet...

    No not at all. My most humble apologies; I did not mean to infer anything counter productive—this was only my personal opinion, and work flow—I never shut down my mac unless necessary.

     

    I had added the word "routinely" to help quantify the statement, not qualify.

     

    Keep up the good work Lexiepex !   Please post a link to your user tip   Found it: A method to quit all apps at once

     

    On we go !

  • by Osiyo,

    Osiyo Osiyo Oct 5, 2016 9:21 PM in response to Lexiepex
    Level 1 (13 points)
    Desktops
    Oct 5, 2016 9:21 PM in response to Lexiepex

    Hey! Got me started on an interesting project. Got me considering two issues.

    1. This simple command closes only apps open on the desktop without active connections to Trash, Photoshop and any other 'connected' (multi-thread) process. Some applications in menu bar ignore 'quit all applications' script.
    2. Sometimes there is an unusual, inconsistent Dock response, where the entire Dock darkens, then vanishes with Menu Bar! Dock returns, however Menu Bar remains hidden until the Finder icon in the Dock is clicked, when the menu bar also returns to view! In the Apple Communities discussion Using Automator to quit Finder, Steve Gallant mentions Pathfinder (an excellent App Store utility). Pathfinder has 'quit all' functionality that will mimic (also erratically) the Automator's killing of Dock and Menu Bar. However, the Pathfinder expression of this 'bug' coincides with replacement of Finder, so without the finder icon to recover Menu Bar, Pathfinder crashes the OS instance.

    The Menu Bar behavior is most troubling. It seems to effect only 'Quit All Applications' runs where at least one app is open with at least one item in the Trash.

     

    Wow! So we got to thinking that this single Automator > Utilities > Run AppleScript > 'Quit All Applications' was removing Finder stability, some process also lacking in Pathfinder. So we stepped up to try and add stabilizing structure to that simple Automator script. Here's what we got, and it seems solid.

     

    Open Automator: select new Application

    • Utilities > Quit All Applications
    • Utilities > Run AppleScript
      Replace all of
      (* Your script goes here *)
      with
      tell application “Finder”
      empty the trash
      end tell
    • Utilities > Run AppleScript
      Replace all of
      (* Your script goes here *)
      with
      cat
      osascript –e ‘tell application “Finder” to quit’
    • Save as QUIT!

    A method to quit all apps at once
    Emptying the trash automatically
    Using Automator to quit Finder

  • by Lexiepex,

    Lexiepex Lexiepex Oct 6, 2016 12:17 AM in response to Osiyo
    Level 6 (10,536 points)
    Mac OS X
    Oct 6, 2016 12:17 AM in response to Osiyo

    Thanks for your comments.

    Afaik theQuitAll script has no influence possible on the Finder issue you describe.

    Relaunch Finder (in the Forcequit item in Apple Menu) should be used for that, I guess.

  • by Osiyo,

    Osiyo Osiyo Oct 7, 2016 6:54 AM in response to Lexiepex
    Level 1 (13 points)
    Desktops
    Oct 7, 2016 6:54 AM in response to Lexiepex

    I posted my solution here.

    Automator quit all

     

    I think you will agree, Automator seems to have grouping limitations. What is working is stepping assembly in this order:

    1. Built in C+ whatever 'Quit All Applications'.
    2. AppleScript, 3 second delay closes and relaunches Finder desktop activity.
    3. Shell Script osascript re-runs step 2.
    4. Back to AppleScript with a 1 second delay to empty Trash.

     

    So, Any two AppleScript runs together lynches the application. Any ideas why that might be?

     

    Group 1: Utilities > Quit all applications

    Quit all applications

     

    Group 2: Utilities > Run AppleScript

    on run {input, parameters}

      tell application "Finder"

      activate

      quit

      delay 3

      tell application "Finder"

      activate

      end tell

      end tell

    return input

    end run

     

    Group 3: Utilities > Run Shell Script

    cat

    osascript -e 'tell application "Finder" to quit'


    Group 4: Utilities > Run AppleScript

    on run {input, parameters}

      tell application "Finder"

      empty the trash

      end tell

      delay 1

      return input

    end run