The “Minimize All Windows” script you created should be listed.
Update 20151027: I got a very good question in the comments below by Carlo DelPizzo, asking about the best way to figure what number a UI element is. Click on the icon, then “Fastscripts”, then “Preferences”. Working in conjunction with AppleScript Editor’s UI Elements command will make it far easier to figure out exactly how you need to write your script to get it up and running.
Simply download and install the Fastscripts application, and you will have an icon added at the top of your Mac screen. Fixing this is very simple, however, by using a free application called “FastScripts”, available at. Unfortunately Applescripts cannot normally be assigned a hotkey. Now that we have the script created, we need to create a hotkey combination to run it. Instead, you must prefix the path with the file specifier at the time the file is targeted by a command, as shown in Listing 15-8. set theFile to file 'Macintosh HD:Users:yourUserName:Desktop:My File.txt'. Key code 4 using Ĭlick on “File” then “Save”, and give it a name like “MinimizeAllWindows”Īt this point you can actually test the script by simply clicking on “Script” then “Run”, and you will see all your open windows get minimized. Listing 15-8 AppleScript: Example of incorrect usage of a file object specifier. Here are the commands again, so you can simply cut and paste them into the Applescript Editor window: Open your Applications folder, double click on “Utilities” then “Script Editor”.Ĭlick on “File” then “New” and paste the following into the empty script window: This is very simple, and you don’t have to know a thing about scripting or coding to do this yourself. Then you assign a hotkey, and you’re done! Fortunately, though, some highly scriptable applications allow you to record activities in the AppleScript editor, very much like a macro recorder which translates your actions into (editable. You just need to use the Applescript Script Editor built into Macs to create and save a trivial script to minimize all the windows. Luckily the real solution is actually very simple to create. I was pretty amazed to find that this was not already one of the multitude of Mac shortcuts available, and even more surprised to find that even a google search only came up with complex, and unreliable workarounds that various individuals recommended trying. As soon as you do anything besides look at your desktop all the open windows reappear, cluttering up your screen again. Sure, Macs have the ability to move windows out of the way temporarily, but that is not the same thing. If you ever used Microsoft Windows in the past and are now using an Apple computer, one thing you are surely missing is a quick way to minimize all windows with a keystroke.