Sunday, June 20, 2010

Dual_Finder.app: An OSX Script to Open Multiple Finder Windows with a Single Click

Want to be able to open 2 Finder windows side-by-side by clicking an icon on the dock?

To do so:

1. save this applescript to your “~/applications/applescript” folder;
2. open this script with "Applescript Editor.app";
3. modify the “hei”ght and “wid”th to match your monitor;
4. “save as” an application.
5. drag the application (.app) file to your dock next to Finder and give it a new icon.

Here's the script:

property wid : 1200
property hei : 850
set the startup_disk to (path to startup disk)
tell application "Finder"
 activate
 set visible of (every process whose visible is true and frontmost is false) ¬
  to false
 -- Window 1--
 set win to make new Finder window
 set the target of win to the startup_disk
 set the bounds of win to {0, (hei * 0.056) div 1, ¬
  wid, (hei * 0.55) div 1}
 set the current view of win to column view
 -- Window 2--
 set win to make new Finder window
 set the target of win to the startup_disk
 set the bounds of win to {0, (hei * 0.58) div 1, ¬
  wid, hei}
 set the current view of win to column view
 select the last Finder window
end tell