by brad » Wed Jan 07, 2004 4:50 pm
You can make a shortcut to do it yourself:
Open Notepad or another text editor, and type or Copy/Paste the exact line (new ActiveXObject("Shell.Application")).CascadeWindows(). Choose File, Save As. Navigate to an appropriate directory and type a name like "Cascade.js"; include the quotation marks so Notepad won't tack on its default .txt file extension. Click Save. To test the script, open Explorer and locate the icon for the file you just saved. When you double-click it, the open windows on your desktop should cascade.
To create scripts that will tile your open windows horizontally or vertically, repeat the steps outlined above but replace CascadeWindows() with TileHorizontally() or TileVertically(). Save each of these variations as its own separate .js file.
If you want to have quick access to your scripts, use the right mouse button to drag the files from the Explorer window and drop them into an appropriate submenu of the Start menu, onto the Quick Launch toolbar, or onto another toolbar. When you release the mouse button, select Create Shortcut(s) Here. Henceforth, you now tile or cascade all nonminimized windows just by clicking your shortcuts.
Note that if your computer associates JavaScripts with Notepad or another text editor, it won't run the script. To fix that, after you've placed the shortcut into your menu or toolbar, right-click the shortcut and choose Properties. Make sure the Shortcut tab is in front, and click the beginning of the Target text box. Type wscript.exe and a space. Click OK.
If you launch your scripts from the Quick Launch toolbar, you'll probably want to give them distinctive icons so you can recognize them quickly. Right Click on the icon and select Properties. Now select Change Icon.
You can undo the new window arrangement by pressing Ctrl-Z immediately afterward. Note that the undo keystroke will not work if the last active application uses Ctrl-Z for its own purposes; the alternative method is to right-click the taskbar and select Undo Cascade.
brad