Okay, here is a quick run-down of how I fully utilize the power of DragThing. DragThing is a MacOS utility that provides multiple tabbed docks to store aliases, web links, etc. It also has a process dock that acts much like the MacOS X dock (with some customization differences).

What really hooked me, though, was the ability to add hot-keys and applescripts.

Read the rest of this article for some useful examples of both hot keys and AppleScripts with Drag Thing, including a script to automatically display an updated listing of your volumes in a dock layer.

Let's start with something simple. You want to be able to assign a hot-key that will open a selected file in the Finder into a favorite application. For instance: Select one or more files in the Finder, then hit cmd-cntrl-b to open those files into BBEdit.

Create the following applescript (using ScriptEditor) and save it as a compiled script (not an application):

--OpenWithBBEdit.scpt --path to the BBEdit application set BBEdit to "Sorenson:Applications:Office:BBEdit:BBEdit 6.5"tell application "Finder" open selection using BBEdit end tell

I believe Apple has already given you a Scripts folder in your Library folder to save such things. Now drag that script to a slot in DragThing. I have a layer that is dedicated to holding hot-key scripts. Right-click on the script in DragThing and select "Item Options...". Click "Use Hot Key to open item" and click on the bar to assign it the cmd-cntrl-b combination.

That's it! From here on, you can select a file, and hit cmd-cntrl-b to open it in BBEdit. You can create other scripts for all your often-used apps.

Notice that you can also make a hot-key to bring the finder to the front with this script:

--ActivateFinder.scpt tell application "Finder" activate end tell

Now, let's say you want to make a DragThing layer hold all your volumes (including temporary volumes!). Create the following script, and give it a hotkey. Now, everytime you hit that hot-key, DragThing will appear, switch to the Disks layer, and update the slots with your mounted volumes. Slick, eh??

--DragThingDisks.scpt--This script will bring Dragthing to the front, add/update a list of --mounted volumes to the dock and layer specified onthe first two lines,--and switch to that layer.----The savedslots variable refers to to how many slots you want to be left--alone. For instance, if you wish to keep your Home and Temporary--directory in the top two slots, set savedslots to 2.----Shortcomings: You'll notice that any network volumes that have the base--directory mounted can not be perused. This is a limitation imposed by--DragThing due to complications in MacOSX.

set diskdock to "Main"set disklayer to "Files"set savedslots to 2

--Get the list of mounted volumes from the Findertell application "Finder" set disklist to the name of every disk as listend tell

--Count the mounted volumesset disknumber to number of items in disklist

--Count the number of slots available in the layer set maxslots to the number of slots of layer disklayer of dock diskdock

--Make sure the number of volumes doesn't exceed the size of the layer if disknumber > (maxslots - savedslots) then set disknumber to (maxslots - savedslots) end if

--Add each volume one at time set n to 1 set m to 0 repeat until n > disknumber if (item n of disklist as string) contains "Servers" then --ignore and adjust marker set m to 1 else --add the volume set file location of slot (n + savedslots) of layer disklayer of ¬ dock diskdock to file (((item n of disklist) & ":") as string) end if set n to n + 1 end repeat

Another great feature that's worth noting is that DragThing does hot spots really well. I have actually killed my dock and replaced it with DragThing. It's at the bottom of my screen and takes up only half the space of the dock. Set the hot spot to the bottom of the screen. Now when you open applications, instead of going behind the Dock, like they normally would, they go on top of DragThing, but when you move the mouse to the very bottom of the screen, DragThing jumps to front. All I need now is for DragThing to support the dynamic icons so I can see when I have new e-mail and I'll be set! Definitely worth every penny to get it.