I posted this to this thread on the forums last night, and got a bunch of emails saying how useful it was ... so I figured I'd submit it to the main site. I'll throw in the relevant bits below, but the link probably explains it better than I...
I was kind of bored, so I decided to mess around. I came up with this script, which I then saved as a run-only application, and threw in my dock next to the trash can. I'm sure it can be improved a lot (for instance, this only counts the amount in your user trash (not any other volumes), but it works for me.
set amount to do shell script "du -sk ~/.trash | awk '{print $1}'"
display dialog "There are " & amount & " kb in trash. Would you like to empty?"
if button returned of result = "OK" then
tell application "Finder"
empty trash
end tell
end ifMaybe I should explain what (I think...) this code does.
set amount to amount / 1024And change the dialog from kb to mb.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030226135215160