Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'This is rather fun!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
This is rather fun!
Authored by: DragonsBane on Nov 27, '01 09:53:31PM

Care to share? Would love to see your revised script =)



[ Reply to This | # ]
This is rather fun!
Authored by: james_sorenson on Nov 28, '01 02:00:49PM

Okay, here is my revised script. I didn't compile it as an application, but just
assigned it a hot-key. Using the script menubar item is also rather nice.
Here it is:

--FinderInit.scpt
--This script activates DragThing, opens two finely positioned Finder Windows, and opens the Info Window

--True Monitor size
property monitor_width : 1152
property monitor_height : 870
--Thicknes of titlebars (to prevent overlapping)
property menubar : 23
--Margins to make room for DragThing, Dock, Desktop items, etc
property leftmargin : 138
property rightmargin : 0
property topmargin : 0
property bottommargin : 54
--Height and width of the Info Window (will be placed to the right of the bottom window)
property infowidth : 280
property infoheight : 335


--Bring DragThing to the front (delete if you don't have it)
tell application "DragThing"
activate
end tell


tell application "Finder"
--set default directory (Notice that "home" represents your home directory)
set folder1 to home
--This is how you can refer to a subdirectory in your Home directory
set folder2 to ((home as string) & "Documents") as alias
--Use this if you'd prefer your bottom folder to go to root
--set folder2 to the startup disk

--clean up
activate
close every Finder window

-- BOTTOM WINDOW
set bot_window to make new Finder window
set the target of bot_window to folder2
--monitor origin is upper-left corner
--{left,top,right,bottom}
set the bounds of bot_window to {leftmargin, (monitor_height - infoheight - bottommargin),
(monitor_width - rightmargin - infowidth), (monitor_height - bottommargin)}
set the current view of bot_window to column view

-- TOP WINDOW
set top_window to make new Finder window
set the target of top_window to folder1
--monitor origin is upper-left corner
--{left,top,right,bottom}
set the bounds of top_window to {leftmargin, topmargin + (menubar * 2),
(monitor_width - rightmargin), (monitor_height - infoheight - bottommargin - menubar)}
set the current view of top_window to column view

-- INFO WINDOW
--Applescript currently can't set the position or bounds of the Info Window.
--Just move it to where you want it, close it, then open it. From then on, it will open in the proper place.
open information window of folder1
--set info_window to the information window
--set the position of info_window to {(monitor_width - rightmargin - infowidth), (monitor_height - infoheight - bottommargin)}

--Reactivate TOP WINDOW
select top_window
end tell



[ Reply to This | # ]
This is rather fun!
Authored by: Anonymous on Nov 28, '01 11:37:44PM

Great script!

Have you figured out how to tell the inspector to go to preview mode?

Your margin system is excellent.

I'm using a variation of your script now.

Cheers,

Y



[ Reply to This | # ]