I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains 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" | |
set visible of every process whose visible is true and name is not "Finder" to false | |
set the collapsed of windows to true | |
end tell |
This file contains 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
(* | |
Copy and paste this script into a new document in AppleScript Editor. | |
When saving, select "Script Bundle" as File Type. | |
Save the file to: "~/Library/Script Libraries/Access NSScreen.scptd" | |
Note: you may need to create the directory: "~/Library/Script Libraries" | |
Note: while this gist has the file ending "scpt", by selecting the | |
"Script Bundle" file type, the file extension "scptd" should be added. | |