Quantcast
Channel: TUAW - The Unofficial Apple Weblog
Viewing all articles
Browse latest Browse all 25

Cascade Finder windows with AppleScript

$
0
0

Cascade Finder Windows with AppleScriptYou'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.
Cascade Finder Windows with AppleScript
Does your screen look like this, with windows everywhere? AppleScript can help.
Cascade Finder Windows with AppleScript
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.
Prep Work
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.
Cascade Finder Windows with AppleScript
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.
Cascade Finder Windows with AppleScript
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.
Cascade Finder Windows with AppleScript
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.
Cascade Finder Windows with AppleScript
Give the script a desired window height
The script asks how many pixels wide to make each window, suggesting 350.
Cascade Finder Windows with AppleScript
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.
Cascade Finder Windows with AppleScript
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.
Cascade Finder Windows with AppleScript
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.
Cascade Finder Windows with AppleScript
Cascaded Finder windows, staggered to the right
Cascade Finder Windows with AppleScript
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.

Cascade Finder windows with AppleScript originally appeared on TUAW - The Unofficial Apple Weblog on Tue, 27 Nov 2012 09:30:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Viewing all articles
Browse latest Browse all 25

Latest Images

Trending Articles





Latest Images