Last active
November 1, 2022 17:11
-
-
Save Koze/2e1a9bf967b2bf865fc9 to your computer and use it in GitHub Desktop.
Close all windows with AppleScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Finder" to close windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# index 1 is frontmost window | |
tell application "Finder" to close window 1 |
This doens't work for me, it only closes Finder windows : /
@yoland68
Because tell application "Finder"
means to work on Finder.
If you want to work with all applications, I think you need to take the list of applications and tell application
to each one.
Gotcha, thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Close all finder windows