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

Close all windows

I want to close all windows and then have the Finder selected as the active app without having opened a Finder window.

I started with:


tell application "Finder" to close every window


I thought that as a first step this line would close every window if I ran it and nothing happens.


Any help?


Thanks

Posted on Oct 5, 2015 7:06 PM

Reply
8 replies

Oct 5, 2015 7:31 PM in response to VikingOSX

Hi

I want to quit all apps prior to cloning which happens in the middle of the night. The QuitAll workflow in Automator does not work all the time as it leaves Adobe Reader open and sometimes get an error message that Adobe quit unexpectedly. In addition, it seems that the Quit All Automator workflow will not always quit open apps especially the active window. As a "workaround" I noticed that if all windows were closed and I selected the desktop and then ran the QUIT ALL it seems to work.

So I was going to add a script to the workflow to close all windows and select Finder then run quit all and add do not quit Adobe reader to the workflow to avoid the Adobe error and live with Adobe open.


Hope I made the point but here is a link to another post


Automator Quit All Applications


Thanks

Oct 7, 2015 4:16 AM in response to APPLEAL

In the list white_list, add Finder, and your Adobe app. Then two repeat loops in series: 1) close each open application, except those in white_list, 2) quit every application except those in white_list. The last thing that you do is try the following to see if your Adobe application goes down gracefully.


tell application "Adobe" to if it is running then quit -- replace Adobe with your actual Adobe app name


Ideally, last app standing would be the Finder.

Close all windows

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