Cascade Finder windows with AppleScript
You're busy. You've got tons of things going on at any given time. Your Mac's screen is constantly cluttered with a bazillion Finder windows, and you keep shuffling them around to find the one you need. Sure, Mission Control in Mountain Lion lets you view all of your Finder windows at once in a pretty tiled view. But, it doesn't sort them, and with a ton of little windows, finding the one you want is no piece of cake. How nice would it be if the Finder had a "Cascade Windows" feature? With a little help from AppleScript, your wait is over. In this post, you'll write a simple AppleScript that sorts your opened Finder windows and cascades them, making it quick and easy to find the one you want and clearing your cluttered screen in the process. Let's get started.
Does your screen look like this, with windows everywhere? AppleScript can help.
Expose shows your Finder windows, but it's still not always easy to find the one you need
If you get stuck with any of the scripting in this post, you can download the complete scripts here.
First, you'll need some opened Finder windows. If you're interested in the topic of this post, then odds are good that you already have plenty of opened windows. If not, you can open some, or you can run the following AppleScript to create some for testing. Just open up AppleScript Editor in your /Applications/Utilities folder, paste in the following script and run it. The script creates a folder named Cascade Windows Test on your Desktop, adds 10 subfolders to it, opens them, and randomly positions them on your screen.
The Cascade Windows Test script creates a bunch of folders and opens them, ready for cascading.
Writing the Script
Create a new AppleScript Editor document and paste in the following script. Comments have been provided to explain each portion.
Running the Script
When you're ready, go ahead and run the script. Or, for quick access, save the script as an application and drag it to your Dock. When run, the script asks you to specify how many pixels you'd like between the menu bar and the first window. A default value of 10 pixels is suggested.
Tell the script how far down you'd like the first window positioned
Next, the script asks you how many pixels you'd like between the left side of the screen and the first window. Again, a default of 10 pixels is suggested.
Tell the script how far over you'd like the first window positioned
The script asks you how many pixels high you'd like each window, suggesting 300.
Give the script a desired window height
The script asks how many pixels wide to make each window, suggesting 350.
Give the script a desired window width
Choose how far apart you'd like the windows from one another. The default is 25 pixels, and should allow enough space to see each window's title bar.
Specify an offset between the cascaded windows
Finally, the script asks if you want to cascade the windows to the right. Doing so creates a staggered effect.
Choose whether you want your cascaded windows staggered to the right
The script finds any opened Finder windows, sorts them alphabetically by folder name, and cascades them.
Cascaded Finder windows, staggered to the right
Cascaded Finder windows without staggering
With your windows cascaded by name, just scan through the title bars to find the one you need and click it to bring it to the front. Your days of searching through a cluttered screen of windows has come to an end.
Subscribe to Newsletter
Software Updatesmore updates
- Automatic targets teen drivers with License+ service
- Dropbox adds support for TouchID
- YouTube for iOS gets updated with full support for iPhone 6 and 6 Plus
- iOS 8.0.1 update now available (Updated -- Don't update!)
- NFL Mobile updated for 2014 Season with new Fantasy Football features, NFL Now integration
- Yahoo Mail improves email inbox searching with new filtering options