My favorite macro utility is iKey from Script Software. I use it to type my name, address, email and other simple tasks. However, I found another use that allowed me to drop a third-party hack. When I switch from application to application, I only want to see the windows of the active app and not the clutter of the others in the background. So I created the following macro in iKey...
I first created a new sequence in the iKey editor and set the General timing preference to "Programmed 'After Activation.'" In the sequence settings, I dragged a Keyboard command and set it to "Type, Press, Release Keys." The keys it was set to press were "Option-Command-H".
Now, whenever I change from application to application, I only see that app's windows. To bypass this, I can deactivate iKeys with a hotkey, or just select "Show All" from the menu.
[robg adds: There are a number of additional apps that implement a "hide when switching" behavior -- DragThing is what I use on my PowerBook, where screen real estate is most precious -- but there are others as well.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050214155123525