- Create an AppleScript application. Open AppleScript Editor (Applications » Utilities » AppleScript Editor in 10.6) and paste in this code:
(* Show Desktop AppleScript by Mohan Noone, 2009 *) activate application "Finder" do shell script "/Applications/Utilities/Expose.app/Contents/MacOS/Expose 1"
- Save the script, name it something like Show Desktop, set the File Format to Application, and select the Run Only option in the Save dialog.
- Optional: change the boring script icon. Select the saved file in Finder and hit Command-I to open the Get Info Window, then do the same for the file with the icon you'd like to use. Then select the better icon from its Get Info Window, copy it (Command-C), select the script icon in the other Get Info window, and paste (Command-V).
- Drag the saved file to the Dock.
[robg adds: This works in 10.5 and 10.6, at least. For use in 10.5, you'll need to take /Utilities out of the do shell script line. I'm also not sure why you need to activate the Finder first; it seems to work fine for me with just the shell script line. Note that you can activate Exposé's other modes in this manner -- change 1 to 2 and you'll get Exposé's Application Windows mode, and 3 gets you All Windows mode.]

