I'm hardly an AppleScript wizard, but here's what I did. I downloaded this script and put it in the tool bar, but it always quits on me and does nothing. This is odd, since I can run it through Script Editor.
Fixing the script as you want is really pretty simple. There are, in fact, a couple of things I'd change with it, but right now it's not possible using just AppleScript. Maybe tomorrow I might post something that'll require the OSX PowerAddOns Lite scripting addition (which you can get at
www.versiontracker.com). But for now, here's what you want specifically. Things in boldface are what you should change, and within (* and *)'s is an explanation of what to change and why:
property monitor_width : 1024 (*Set this to your actual monitor resolution width. For me, this was 1280*)
property monitor_height : 1024 (*Again, set this to your actual monitor resolution height. For me, this was 1024*)
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
-- BOTTOM WINDOW set this_window to make new Finder window
set the target of this_window to the startup_disk
set the bounds of this_window to {0 (*This is the left-most position of the window. Since icons in the dock can be at most 128x128 I believe, and there's a little space left, I'd suggest setting this to 150*), (monitor_height * 0.66) div 1, monitor_width, monitor_height}
set the current view of this_window to column view -- TOP WINDOW
set this_window to make new Finder window
set the target of this_window to the startup_disk
set the bounds of this_window to {0 (*Set this to the same number you set the above one to*), (monitor_height * 0.33) div 1, monitor_width, (monitor_height * 0.66) div 1}
set the current view of this_window to column view
end tell
Hope this works. What I'd like to modify are these things:
*Automatically recognizing the placement of the dock.
*Automatically recognizing the size of the dock.
*Automatically recognizing the resolution of the monitor.
These features probably would have been in here, but for some reason, the dock isn't scriptable, and I can't find a dictionary for checking the monitor resolution.